Robotics C++ Physics II AP Physics B Electronics Java Astronomy Other Courses Summer Session  

Exercises

 

Exercise 1

 

Prompt the user to enter his age in years as an integer.

If the age is equal to or greater than 21 state You Can Drive

Otherwise (if the age is less than 21) state You Cannot Drive

 

Exercise 2

 

Prompt the user to enter his height in inches as an integer

Prompt the user to enter the number of cars he owns.

If his height is greater than 48 and the number of cars he owns is greater than 0 then state You Can Drive Your Own Car

Otherwise state You Cannot Drive Your Own Car