Test Cases: Input: 5 Output: 1 3 4 2 4 8 10 3 12 15 4 8 12 16 20 5 10 15 20 25

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter7: Input/output Technology
Section: Chapter Questions
Problem 14VE
icon
Related questions
Question
Programming Exercise
 
One of the basic mathematical operation we learned from the primary school is multiplication. One number multiplied to another number will result into a product. So far, one of the easiest ways to learn multiplication is through a multiplication table. In this exercise, you will be asked to create a program that will asked for a certain number then the program shall print the multiplication table up to that n. In this program, you are required to use the nested do-while loop structure.
 
Input:
One line integer containing the value of n.
 
Output:
Multiplication table. (sample shown on the test cases)
Test Cases:
Input: 5
Output:
4
5
2
4
6.
8
10
3
9.
12
15
4
8.
12
16
10
15
20
25
O n O u
Transcribed Image Text:Test Cases: Input: 5 Output: 4 5 2 4 6. 8 10 3 9. 12 15 4 8. 12 16 10 15 20 25 O n O u
Input: 9
Output:
2
1
4
7
8.
9
2
4
6.
8.
10
12
14
16
18
3
6
9.
12
15
18
21
24
27
4
8
12
16
20
24
28
32
36
5
10
15
20
25
30
35
40
45
6.
12
18
24
30
36
42
48
54
7
14
21
28
35
42
49
56
63
8.
16
24
32
40
48
56
64
72
9.
18
27
36
45
54
63
72
81
LO
Transcribed Image Text:Input: 9 Output: 2 1 4 7 8. 9 2 4 6. 8. 10 12 14 16 18 3 6 9. 12 15 18 21 24 27 4 8 12 16 20 24 28 32 36 5 10 15 20 25 30 35 40 45 6. 12 18 24 30 36 42 48 54 7 14 21 28 35 42 49 56 63 8. 16 24 32 40 48 56 64 72 9. 18 27 36 45 54 63 72 81 LO
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Types of Loop
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning