Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 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.