[정올] Language Coder_반복제어문2_형성평가A_code139 (C)
두비니
·2020. 3. 31. 05:43
#include <stdio.h>
int main() {
int a, b;
scanf("%d %d", &a, &b);
if (a < b) {
for (int i = 1; i <= 9; i++) {
for (int j = a; j <= b;) {
printf("%d *%2d = %2d ", j, i, j*i);
if (a < b)
j++;
}
printf("\n");
}
}
else {
for (int i = 1; i <= 9; i++) {
for (int j = a; j >= b; j--) {
printf("%d *%2d = %2d ", j, i, j*i);
}
printf("\n");
}
}
return 0;
}
'Coding_Algorithm > 정올 문제풀이' 카테고리의 다른 글
[정올] Language Coder_반복제어문3_자가진단2_code634 (C) (0) | 2020.04.02 |
---|---|
[정올] Language Coder_반복제어문3_자가진단1_code549 (C) (0) | 2020.04.01 |
[정올] Language Coder_반복제어문2_형성평가9_code138 (C) (0) | 2020.03.30 |
[정올] Language Coder_반복제어문2_형성평가8_code137 (C) (0) | 2020.03.29 |
[정올] Language Coder_반복제어문2_형성평가5_code134 (C) (0) | 2020.03.28 |