(5) Repetitive 문제3 -2

C/간단한 코드 2018. 6. 21. 13:41

[심화1] 입력 받은 수까지 구구단을 출력!

 

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <stdio.h>
 
void main()
{
    int i = 0;
    int j = 0;
    int iNum1 = 0;
    int iNum2 = 0;
 
    printf("몇단부터 ?? :");
    scanf("%d"&iNum1);
    printf("몇단까지 ?? :");
    scanf("%d"&iNum2);
 
    for (i = iNum1; i <= iNum2; i++)
    {
        for (j = 1; j <= 9; j++)
        {
            printf("%d x %d = %d\t", i , j , i * j);
        }
        printf("\n");
    }    
    system("pause");
}
cs

 

▼ 결과

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

'C > 간단한 코드' 카테고리의 다른 글

(5) Repetitive 문제3-최종  (0) 2018.06.21
(5) Repetitive 문제3 -3  (0) 2018.06.21
(5) Repetitive 문제3-1  (0) 2018.06.21
(5) Repetitive 문제2  (0) 2018.06.20
(5) Repetitive 문제1  (0) 2018.06.20

설정

트랙백

댓글