There are two variables a
and b
, and I want to get data from the user. The data can be a number from 1
to 1000
or #
, and they should be apart by a space.
So how to get this kind of input from the user?
In general, this is too broad a scenario to provide exact answer. However, I'll be happy to provide you the idea.
fgets()
.strtok()
.strtol()
) to check and convert the inputs.Now choose a language, write the code and come back if you have any specific issue / question to be addressed / answered.