In this exercise you have to add values and variables so that the equation calculates the amount of seconds in a year.
My code
public class SecondsOfTheYear {
public static void main(String[] args) {
// In below an incomplete version of the program. Please complete it!
int daysInYear = 365;
int hoursInDay = 24;
int minutesInHour = 60;
int secondsInMinute = 60;
int secondsInYear = daysInYear * hoursInDay * minutesInHour *secondsInMinute;
System.out.println("There are " + secondsInYear + " seconds in a year");
}
}
Model code
public class SecondsOfTheYear {
public static void main(String[] args) {
// In below an incomplete version of the program. Please complete it!
int daysInYear = 365;
int hoursInDay = 24;
int minutesInHour = 60;
int secondsInMinute = 60;
int secondsInYear = daysInYear * hoursInDay * minutesInHour *secondsInMinute;
System.out.println("There are " + secondsInYear + " seconds in a year");
}
}