#include<stdio.h>
int main()
{
int i, j;
for(scanf("%d ",&i); i<=10; i++)
printf("%d ",i);
return 0;
}
I am a beginner in the programming world so please help me understand why on compiling the above C code it asks inputs twice.Maybe there's some logic to loop here I might be missing. Please help me understand.Thanks in advance.:)