Sorry these may sound like stupid questions but how does getchar work? I know that it reads the data one by one in ASCII code but how can u tell it to store numbers only and print an error message if other characters are used? For an assignment i receive 5 dice values, which are entered, i'm have to display a error message if the numbers are entered with a space between them e.g 1 2 3 4 5 is ok but 1.2.3.4.5 is not. Sorry if this sounds stupid, but i have only just started and help as u can tell.
Thanks for any reply
Thanks for any reply
Comment