Originally Posted by
Chleborad
I have a test coming up that involves me doing the following:
1.) Create a program that reads four numbers, space seperated, from a data file printing only the smallest.
2.) Create a program that reads four numbers, comma seperated, from a data file printing only the largest.
3.) Create a program that reads four numbers, colon seperated, from a data file printing only the odd numbers.
4.) Create a program that reads four numbers, simicolon seperated, from a data file printing only the even numbers.
That's what I'm going for, so am i reading the question wrong?
Here, play with this and tell me if it gives you any ideas...
Code:
int _cdecl main(int argc, char *argv[])
{ int a,b,c;
printf("3 coma separated numbers please : ");
if( scanf("%d , %d , %d",&a,&b,&c) < 3)
puts("Input Error");
printf("%d %d %d\n",a,b,c);
return 0; }