-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram2.C
More file actions
38 lines (32 loc) · 888 Bytes
/
Program2.C
File metadata and controls
38 lines (32 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/////////////////////////
// //
//Programming by NUBB.1//
// //
/////////////////////////
#include <stdio.h>
int main()
{
int i,number;
do
{
printf("\n\nEnter number 2-19 (0 to QUIT) : ");
scanf("%d",&number);
if (number>=2 && number<=19) //2-19 case
{
printf("\nMultiplication Table for %d\n",number);
for(i=1;i<=12;i++)
{
printf("%5d",i);
}
printf("\n--------------------------------------------------------------\n");
for(i=1;i<=12;i++)
{
printf("%5d",i*number);
}
}
else if (number==0) printf("Good luck!"); //QUIT case
else printf("Input Error. Enter 0 to QUIT or number between 2-19."); //Error case
}
while(number!=0);
return 0;
}