3 like 0 dislike
182 views
Write a program that reads an integer and displays its multiplication table. For exam­ple, if the user enters 5, the output should be 1*5 = 5, 2*5 = 10,..., 10*5 = 50. The program should force the user to enter an integer within [1, 10], else return Invalid number.

Sample Input 1:

5

Sample Output 1:

1*5=5

2*5=10

3*5=15

4*5=20

5*5=25

6*5=30

7*5=35

8*5=40

9*5=45

10*5=50

Sample Input 2:

11

Sample Output 2:

Invalid number

 

References: C From Theory
[Normal] Coding (C) - asked in Introduction to Computer Programming I (C) by (20.9k points)
ID: 21859 - Available when: Unlimited - Due to: Unlimited
| 182 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.70.130.41
©2016-2024

Related questions

3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 12, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21926 - Available when: Unlimited - Due to: Unlimited
| 245 views
3 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 12, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21923 - Available when: Unlimited - Due to: Unlimited
| 245 views
2 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 8, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21880 - Available when: Unlimited - Due to: Unlimited
| 218 views
2 like 0 dislike
0 answers
[Normal] Coding (C) - asked Feb 8, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21878 - Available when: Unlimited - Due to: Unlimited
| 270 views
3 like 0 dislike
0 answers
[Normal] Coding (C) - asked Feb 8, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21874 - Available when: Unlimited - Due to: Unlimited
| 225 views
12,783 questions
183,443 answers
172,219 comments
4,824 users