Exercise 2.1

Do the following exercises.

Exercise 2.2

Which of these are legal assignment statements?

Exercise 2.3

Write a program that prompts for and receives from the user a diameter in inches and prints the circumference and area in square centimeters. First, design an algorithm, then write the code.

Exercise 2.4

Write a program that prompts for and receives from the user a number of days and print the equivalent number of weeks and days. First, design an algorithm, then write the code.