Q

codeup 1083

codeup 1083번 문제

codeup 1083번 문제


C code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>

int main(void)
{
int n;

scanf("%d", &n);

for(int i = 1; i <= n; i++)
{
if(i % 3 == 0 || i % 6 == 0 || i % 9 == 0)
printf("X ");
else
printf("%d ", i);
}

return 0;
}