Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2
you can use varibles to store your user input. and you can get your user input by using cin >> then just make your if statement to check if user is over 18. and use the else statment to check if the user is under 18. Hope this helps! P.S I made a program you can look at. it is in my codes. its called Age Detector. let me know if you have any more questions.
20th Nov 2016, 6:21 PM
Metrik 🕵
Metrik 🕵 - avatar