Convert this flowchart into a java program code optimize your code by using only one for loop statement and two ifs statements, there should only be 3 variables. Display your answer by using a dialog box (JOPTION). The sum total should be 2275.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter8: Advanced Data Handling Concepts
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Create a javaprogram that would add the first 10 numbers, then skip the next 10 numbers, do this alternately from number 1-100 (add 10 numbers, skip 10 numbers, add 10 numbers, skip 10 numbers again reaching the number 100)

Convert this flowchart into a java program code optimize your code by using only one for loop statement and two ifs statements, there should only be 3 variables. Display your answer by using a dialog box (JOPTION). The sum total should be 2275.

START
A=1 D= P
C-ゆ
INPUT
FN
C=A+3
AニB
BンC
Dニロ+1
PRINT
DZEN
A
(とNO
Transcribed Image Text:START A=1 D= P C-ゆ INPUT FN C=A+3 AニB BンC Dニロ+1 PRINT DZEN A (とNO
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage