#include<stdio.h>
int main(long int argc, char const *argv[])
{
short int a, i;
scanf("%hd", &a);
while (a!=5) {
printf("%hd\n",a);
a ;
}
return 0;
}
For some reason, it shows the output:
1
1
2
3
4
But why?
CodePudding user response:
I think the first "1" is your input.
I tried to run the same code and that is what I observed the first "1" is the input I gave and then the code prints from 1 to 4.
CodePudding user response: