|
Homework 2 Due Wednesday, 4/12/00Both of these programs should be written as applications, as opposed to applets. That will make your life easier, but you can feel free to do either. 1. Write a program that starts with two variables a = 3, b = 7. Swap the values of the variables. You should print out a and b when the program starts, and after it swaps. 2. Write a program that calculates the area of a circle. You should have two variables: pi and r. Use 3.14159265358979 as the value of pi. Print out the radius and the area at the end of your program. |