Friday, 29 June 2012

Calculates The Number Of Minutes In A Year In Java

Write a program that calculates and prints the number of minutes in a year.

Save this file as MinutesInYear.java.

02 * A calendar year in the Gregorian calendar
03 * (as well as in the Julian calendar) has either
04 * 365 (common years) or 366 (leap years) days.
05 */
06 
07public class MinutesInYear {
08  public static void main(String [] args) {
09    System.out.println("Minutes in a year(leap year): " + (60 24 *365));
10    System.out.println("Minutes in a year(common year): " + (60 24 *366));
11 
12 }
13}

0 comments:

Post a Comment

Internet-PublicLab. Powered by Blogger.