Question: The program prompts the user to enter a number and a mathematical operation and then generates a calculation tower showing the result of applying
The program prompts the user to enter a number and a mathematical operation and then generates a calculation tower showing the result of applying the operation to each integer from 1 to that number (65 credits). Input validation: only positive numbers will be accepted for this program (15 credits). The program will produce a formatted output that resembles the following images (15 credits): Calculation Tower Please input a positive integer number: 51 Please input an operation(+,+./.-): 1+1=1 1.1.1 2+24 1.1 1 2 2 4 3.39 3.3-944-16 111 224 1-1-1 2 24 3.39 416 Calculation Tower Please input a positive integer number: 71 Please input an operation(+/-)/ 1/1-1 1/11 2/2=1 1/11 2/2 1 3/3-1 1/11 2/2-1 3/3-1 4/4-1 5.5-25 3/3-1 4/41 5/5-1 1/11 2/2-1 1/11 2/2 1 3/3-1 1/11 2/2 1 3/31 Calculation Tower 6/6-1 6/6-1 6/6-1 6/6-1 6/6-1 6/6=1 7-1 Please input a positive integer number: 11 Please input an operation(e,+/-)+ 1+1+2 1+1 2 2+24 1+1+2 2+2-4 3-3-6 2+26 1+1 2 1+1 2 2+2 1+1 2 2+2 3 1+12 1+1+2 1+12 2+24 2+24 2+244 2+26 2+26 5+5 30 5+5 10 6+6 10 6+612 6+6 12 7+7=14 6 12 747 14 +16 3+306 6+6 12 6+6-12 7+7 14 7+7 14 510 5+5-10 5+5=10 6+6 12 7 7 14 16 18 +18 99-38 +16 +16 10 10 20 10+10 20 111122
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
