Skip to content

Commit 1ef613c

Browse files
authored
Create Day5-Loops.c
1 parent 0686a47 commit 1ef613c

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/* Sample Input
2+
3+
2
4+
Sample Output
5+
6+
2 x 1 = 2
7+
2 x 2 = 4
8+
2 x 3 = 6
9+
2 x 4 = 8
10+
2 x 5 = 10
11+
2 x 6 = 12
12+
2 x 7 = 14
13+
2 x 8 = 16
14+
2 x 9 = 18
15+
2 x 10 = 20 */
16+
17+
#include <assert.h>
18+
#include <limits.h>
19+
#include <math.h>
20+
#include <stdbool.h>
21+
#include <stddef.h>
22+
#include <stdint.h>
23+
#include <stdio.h>
24+
#include <stdlib.h>
25+
#include <string.h>
26+
27+
char* readline();
28+
29+
30+
31+
int main()
32+
{
33+
int i;
34+
scanf("%d",&i);
35+
int n=1;
36+
for(;n<=10;n++)
37+
printf("%d x %d = %d\n",i,n,i*n);
38+
}

0 commit comments

Comments
 (0)