The input has a line of positive integers. You must process all integers in this line.
1 2 3 4
|
while(scanf("%d", &x)){
//do something
//terminate condition //this I want to figure how
}
|
I tried
scanf("%d%c", &x, &c)
and terminate it when
c != ' '
. But then the input has something like
which end with a space then next line.
Last edited on
It works, tks!! Mind if I ask what does 1l
means?