166k views
3 votes
Problem1: How Much Snow? Snow is falling at the rate of 0.8 inch per hour. Evaporation occurs at the rate of 2% per hour. Complete program HowMuchSnow.java to calculate how many inches of snow are on the ground after snowing a number of hours.

answer in coding on j creator

1 Answer

0 votes

public class HowMuchSnow{

public static void main(String []args){

System.out.println("Hello World");

System.out.println("There are "+ SnowFall(3) + " inches of snow on the ground.");

}

public static float SnowFall(float hours){

float falling = 0.8f - (0.8f * 0.02f);

return falling * hours;

}

}

I hope this helps!

User Lucasgcb
by
5.6k points