#include<stdio.h>
int main(void)
{
int i;
scanf("%d",&i);
while(i > -1)
{
printf("%d\n", i);
scanf("%d", &i);
}
return 0;
}
Whats the problem in this code
#include<stdio.h>
int main(void)
{
int i;
scanf("%d",&i);
while(i > -1)
{
printf("%d\n", i);
scanf("%d", &i);
}
return 0;
}
Whats the problem in this code
try initializing i with some random value.
for eg. int i=0