#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main() {
int n, num, i;
scanf("%d", &n);
for (i = 0; i < n; ++i) {
char ch = '#';
printf("scanned from %d line: ", i + 1);
while (ch != '\n') {
scanf("%d%c", &num, &ch);
printf("%d ", num);
}
printf("\n");
}
return 0;
}
Better?
Veni Vedi Slumber !
On Sun, Jul 3, 2011 at 2:47 AM, anonymous procrastination <
[email protected]> wrote:
> Hey Thanks,,
> I got it.. when I press enter after entering the number it takes that
> as an empty string.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.