Home Robotics C++ Physics II AP Physics B Electronics AP Java Astronomy Independent Study Summer Session Contests  About
                                                       

Exercises

 

 

Exercise 1

    Prompt the user to enter an age in years, with a fractional component.

     If the age of the user is  greater than 21 state that the user can drive. Otherwise, state that he cannot drive.

 

Exercise 2

    Use a loop that will print This is a Loop 10 times, each on a separate line

 

Exercise 3

A prime number is one that is evenly divisible only by itself and 1. For example, 5 is a prime number. Write code that will find and print all primes between 1 and 100, including the end points