Getting multiple values with scanf()

Posted by Josh Curren on Stack Overflow See other posts from Stack Overflow or by Josh Curren
Published on 2009-09-11T18:19:01Z Indexed on 2010/05/30 16:42 UTC
Read the original article Hit count: 234

Filed under:
|

I am using scanf() to get a set of ints from the user. But I would like the user to supply all 4 ints at once instead of 4 different promps. I know I can get one value by doing:

scanf( "%i", &minx);

But I would like the user to be able to do something like:

Enter Four Ints: 123 234 345 456

Is it possible to do this?

© Stack Overflow or respective owner

Related posts about c

    Related posts about scanf