Question: Description: Using for loops for(initialization; condition; increment/decrement){ //statement or code to be executed } Write a program that allows the user to choose a

Description: Using for loops for(initialization; condition; increment/decrement){ //statement or code to be executed } Write a program that allows the user to choose a number between 1 and 10. Then print the corresponding time table Write a title "Time Table:" Read in a number between 1 and 10 from the user Use a for loop to print the time table (see output) Note that the left column is right aligned (the ones line up but the right column is left aligned (one blank after the assignment operator) Hint: %2d print a right aligned column of width 2 Lab While Description: Using While loops Output: Time Table: Number (1-10): 4 1 4 4 2+4=8 3+4=12 4416 54 20 6+4=24 74 28 8432 94 36 104 40 Implement the program based on the activity diagram below. Create an integer variable called product and initialize it with 1 Read in a number from the user (D to quit) and save it in a variable called number [else] Read in a number from the user (0 to quit) and save it in a variable called number Inumber 01 Matply the product with the number and assign the resulting value to product
Step by Step Solution
There are 3 Steps involved in it
TitleTime table Pri... View full answer
Get step-by-step solutions from verified subject matter experts
