14

I remember the first time our class coded a simple program in C. The objective was to input two random numbers, check which one is larger, and output it on the screen.

After class, I asked one of my classmates if he finds the test easy. My classmate replied that it was so easy he got bored. Then when I asked him to show me his code, this was what I saw:

int a, b;
printf("Enter smaller number: ");
scanf("%i", &a);
printf("Enter larger number: ");
scanf("%i", &b);
printf("Larger number: %i\n", b);

Comments
Add Comment