How to read single or multiple value from user without using array or loop?
Hi guys, just wondering how can I read a user input without using loop or array method?
I have a requirement which allowed user to enter a random combination with alphabet A, B and C.
For example, user allowed to input A only, or A and B, or A, B and C and so on.
How it work with ?
As I know if I am using
Code:
scanf("%c%c%c", &x,&y,&z)
, it forced user to enter 3 times. How can I allowed user to enter freely between the 3 alphabet and apply condition accordingly?