Java Homework 1_f36a0eb81b5fc74d48f61311bd4aba49
Java Homework 1_f36a0eb81b5fc74d48f61311bd4aba49
Programming Section:
Question #3:
Write a Java program that prompts the user to input height of three trees, then find and print the average
for these heights.
Question #4:
Write a Java program that prompts the user to input the elapsed time for an event in hours, minutes, and seconds.
The program then outputs the elapsed time in seconds.
For example :
Enter # of hours=2
Enter # of minutes=35
Enter # of seconds=45
Elapsed Time is 9345
Question #5:
Write a Java program that prompts the user to input temperature in Fahrenheit, then find and print temperature
inCelsius.
(hint used the formula : C= (F-32*5)/9
double C= (F-32*5) / 9;
System. out.printin ("C="+c);