구구단, 단수를 입력받아 출력
Console Programming/C++ Console 2019. 9. 20. 09:26|
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
|
#include <stdio.h>
void gugudan(int num1, int num2)
{
int SmallVal, BigVal;
if (num1 > num2)
{
SmallVal = num2;
BigVal = num1;
}
else
{
SmallVal = num1;
BigVal = num2;
}
for (SmallVal; SmallVal < BigVal + 1; SmallVal++)
{
for (int i = 1; i < 10; i++)
{
printf("%d x %d = %d \n", SmallVal, i, SmallVal * i);
}
}
}
int main(void) {
// your code goes here
int num1 = 0, num2 = 0;
printf("두 수를 입력하세요 : \n");
scanf_s("%d %d", &num1, &num2);
printf("\n");
void gugudan(num1, num2);
return 0;
}
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|

'Console Programming > C++ Console' 카테고리의 다른 글
| 열혈C프로그래밍 ch12_1 (0) | 2019.12.05 |
|---|---|
| 윤성우 C프로그래밍 (0) | 2019.09.20 |

