Q

codeup 1073

codeup 1073번 문제

codeup 1073번 문제


C code

1

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=1;

while(n != 0)
{
scanf("%d", &n);

if(n == 0) break;

printf("%d\n", n);
}

return 0;
}


2

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

int main(void)
{
int n;

while(1)
{
scanf("%d", &n);

if(n == 0) break;

printf("%d\n", n);
}

return 0;
}

3

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

int main(void)
{
int n;

while(scanf("%d", &n) > 0)
{
if(n == 0)
break;

printf("%d\n", n);
}

return 0;
}