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 do
Could do this, but then the user has to separate the numbers by a space:
#include "stdio.h" int main() { int minx, x, y, z; printf("Enter four ints: "); scanf( "%i %i %i %i", &minx, &x, &y, &z); printf("You wrote: %i %i %i %i", minx, x, y, z); }