Question: can you show this in a flowchart? Declare a numeric variable for classesTaking to hold the number of classes entered by the user. Declare a
can you show this in a flowchart?
Declare a numeric variable for classesTaking to hold the number of classes entered by the user.
Declare a named constant for SIZE that holds the size of the array and give a value of
Declare a numeric array for classCounts.
Use the SIZE constant as the array sizeInitialize the array the following values:
Declare a numeric constant QUIT with a value of to be used to exit the program.
Create an output that prompts the user to enter the number of classes they are taking or QUIT to end the program.
Create an input for the classesTaken variable
Create a condition that tests if the value of classesTaken is not equal to QUIT. If the user enters QUIT, the program exits the condition. If classesTaken is not equal to QUIT, the program enters a while loop.
Within the loop:
Increment the appropriate element of the classCounts array based on the value of classesTaken.Prompt user again to enter the number of classes they are taking or QUIT to end the program.Loop back to the start of the condition test.
If the user enters QUIT, output the column headers "Classes TakenCount
Initialize classesTaken to
Create a condition that tests if the classesTaken variable is less than If true:
Output the number of classes taken and the corresponding count from the classCounts array.Increment classesTaken by Program loops back to the start of the condition test.
If the value of classesTaken is greater than the program ends. Declare a numeric variable for classesTaking to hold the number of classes entered by the user.
Declare a named constant for SIZE that holds the size of the array and give a value of
Declare a numeric array for classCounts.
Use the SIZE constant as the array size
Initialize the array the following values:
Declare a numeric constant QUIT with a value of to be used to exit the program.
Create an output that prompts the user to enter the number of classes they are taking or QUIT to end the program.
Create an input for the classesTaken variable
Create a condition that tests if the value of classes Taken is not equal to QUIT. If the user enters QUIT, the program exits the condition. If classes Taken is not equal to QUIT, the program enters a while loop.
Within the loop:
Increment the appropriate element of the classCounts array based on the value of classesTaken.
Prompt user again to enter the number of classes they are taking or QUIT to end the program.
Loop back to the start of the condition test.
If the user enters QUIT, output the column headers "Classes Taken Count".
Initialize classes Taken to
Create a condition that tests if the classesTaken variable is less than If true:
Output the number of classes taken and the corresponding count from the classCounts array.
Increment classesTaken by
Program loops back to the start of the condition test.
If the value of classes Taken is greater than the program ends.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
