WHAT'S NEW?
Loading...

Do loop statement exercises



·         Create a program that computes customers items purchased using do loop statement. For example, the customer buys 3 apples and 2 oranges and a customer ask again to double check if the item purchased computed accurately. The program will continue processing until the transaction meets the maximum items order, it depends how you are going to handle the transaction. The user can terminate the program either pressing Yes (Y) to continue to compute again or No (N) to exit the transaction.
o   Note: You need first the input from the user to process the output.
o   Write your algorithm and flowchart answer on a one whole yellow pad paper.
·         Write a program that the user can input a starting number and end number, it’s up for the user where it begins and will it end. Used do loop statement. Example the user input a number 2 for starting number and 10 for end number. The output would be 3, 4, 5 … 10.
o   Note: You need first the input from the user to process the output.
o   Write your algorithm and flowchart answer on a one whole yellow pad paper.
·         Create a program that will print a number from highest to lowest, example the user input the end number 8 and 2 is the index number. The output would be 7, 6, 5 … 1. Used do loop statement.
o   Note: You need first the input from the user to process the output.
o   Write your algorithm and flowchart answer on a one whole yellow pad paper.
·         Write a program the will print a number increment by 5. Used a constant index or starting number at 0. Let the user input a number and should not less than 20 to enable the output visible by 5. Example output would be 5, 10 … 20.
o   Note: You need first the input from the user to process the output.
o   Write your algorithm and flowchart answer on a one whole yellow pad paper.

0 comments:

Post a Comment