1 / 3
Sep 2014

#include <stdio.h>
#include <stdlib.h>
int main()
{
    int n;
    scanf("%d",&n);
    while(1)
    {
        scanf("%d",&n);
        if(n==42)
            break;
        printf("%d",n);
    }
    return 0;
}
  • created

    Sep '14
  • last reply

    Sep '14
  • 2

    replies

  • 277

    views

  • 3

    users

For this input:

1
2
3
42

Your code prints:

2
3

For this input your code returns a NZEC.

42
1
2
3

Suggested Topics

Topic Category Replies Views Activity
C and C++ 0 14 7d

Want to read more? Browse other topics in C and C++ or view latest topics.