I need to make a program where the user types numbers( such as 193643, in one line). Then have each number (such as"1" "9" "3" etc) turned in to its own variable.
how do i do it?
I haven't attempted as i dont get it, I will try my best to explain.
similar to...
printf("Please enter three numbers: ");
scanf("%d",&number1);
The user types 137
Instead of entering 137 and having that become the variable. I need to make it so that If the person enters a number like 137, The program takes "1" as a variable, "3" as another variable and "7" as the last variable. It must be in one line...
SO instead of asking three times as so....
printf("Please enter 1st numbers: ");
scanf("%d",&number1);
printf("Please enter 2nd numbers: ");
scanf("%d",&number2);
printf("Please enter 3rd numbers: ");
scanf("%d",&number3);
have it ask in one line, one time and record each number as a variable...