Google

Thursday, January 14, 2010

CSC202 & ENG4033M: Exercise 2

1. Write a program to input three integers. Then,
print out the total and average.


2. Write a program to input an integer.
If the number is odd, print "Odd Number",
else, print "Even Number".


3. Write a program to input age.

If age is equal to or larger than 16,
print the message "You can party",
else print "Sorry, you cannot party".

If age is larger than 18,
print the message "You can drive a car",
else print "Sorry you cannot drive a car".