1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
NISA [10]
3 years ago
13

Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the number of years and days for the

minutes. For simplicity, assume a year has 365 days. Here is a sample run: Enter the number of minutes: 1000000000 1000000000 minutes is approximately 1902 years and 214 days
Computers and Technology
1 answer:
LenKa [72]3 years ago
4 0

Answer:

// here is code in java.

import java.util.*;

// class definition

class Solution

{

// main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // scanner object to read innput

       Scanner s=new Scanner(System.in);

        // variables

       long  min,years,days;

          long  temp;

          System.out.print("Please enter minutes:");

          // read minutes

          min=s.nextLong();

          // make a copy

temp=min;

 // calculate days

days=min/1440;

 // calculate years

years=days/365;

 // calculate remaining days after years

days=days%365;

 // print output

System.out.println(temp+" minutes is equal to "+years+" years and "+days+" days");

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read the number of minutes from user and assign it to variable "minutes" of long long int type.Make a copy of input minutes.Then calculate total days by dividing the input minutes with 1440, because there is 1440 minutes in a day.Then find the year by dividing days with 365.Then find the remaining days and print the output.

 Output:

 please enter the minutes:1000000000

 1000000000 minutes is equal to 1902 years and 214 days.

You might be interested in
The feature present in most GUIs that helps organize multiple documents or files is _____.
hoa [83]

Answer:

Folders

Explanation:

Because when people write a text document they put it in a folder called Text Documents. Then that's where they store all there text documents. There is really no other explanation.

5 0
3 years ago
What would you use to compare two date ranges in a report?
Katyanochek1 [597]
The solution is Date variety comparison.
The date variety selector is on the top proper of each record besides the real-Time reviews. To compare two exclusive date ranges, pick the evaluate to other dates checkbox, use the controls to set the second date range, then click on follow. now not all graph types guide date evaluation.
7 0
3 years ago
In a system using the fixed partitions memory allocation scheme, given the following situation (and using a decimal form): After
MariettaO [177]

Answer:

I think its B

Explanation:

7 0
3 years ago
Which of the following is ture?
serious [3.7K]

answer: if a list needs to be updated, the entire program must be rewritten.

5 0
3 years ago
WILL GIVE BRAINLIEST!!!!!! 10 POINTS!!!!
stepladder [879]

Answer:

javascript?

Explanation: idrk

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which option allows you to view slides on the full computer screen?
    11·1 answer
  • The ________________ command tests connectivity by sending an echo request to a remote computer.
    14·1 answer
  • Una bombilla de 40 w de potencia está encendida durante 10 horas. Calcular la energía que ha consumido en julios y en kw·h.
    12·1 answer
  • Arrange the steps below to outline what maia needs to do to accomplish this task.​
    9·1 answer
  • What is one method that can be used to open the Microsoft Word application?
    8·1 answer
  • Is the following statement TRUE or FALSE?
    9·1 answer
  • question i need a real answer cuase i have a virus cuase off my borther and these are the notifacations i get and now these site
    11·1 answer
  • Whats the formatting of a letter to the editor?​
    12·1 answer
  • What is 4x+2x(-3-3) thanku
    11·2 answers
  • To delete unnecessary files on a hard disk use software
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!