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]
2 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]2 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
Well this isn't school related, but how do i watch dubbed and subbed anime for free on my computer?
Shtirlitz [24]
Crunchyroll or my anime list. Both of these work.

Hope this helps you

3 0
3 years ago
Read 2 more answers
What can be found in the computer tower
8_murik_8 [283]
There are several things.
Some which include of
<span>Hard Disk Drive (HDD)
</span><span>Processor (CPU)
</span><span>Graphics card
</span>and
<span>Memory (RAM)</span>
8 0
3 years ago
Which pair of properties apply to both sound and electromagnetic waves?
Alex73 [517]
Both waves can have interference, reflection, and diffraction.

Wave interference is a phenomenon that occurs when two waves meet while traveling along the same medium. The interference of waves causes the medium to take on a shape that results from the net effect of the two individual waves upon the particles of the medium.

Wave reflection happens when a wave reaches the boundary between one medium and another medium, a portion of the wave undergoes reflection and a portion of the wave undergoes transmission across the boundary.

Wave diffraction<span> involves a change in direction of waves as they pass through an opening or around a barrier in their path.<span> </span></span>
3 0
3 years ago
Read 2 more answers
Var name = prompt("Enter the name to print on your tee-shirt");
Vinil7 [7]

Willy Shakespeare has 17 characters. It's higher than 12,so the output will be Too long. Enter a name with fewer than 12 characters.

Letter a.

3 0
3 years ago
What do the last two steps in the cyclical design process most likely involve
zlopas [31]

Answer:

Well you would want to test the design, so it would be "c" then "d"

Explanation:

I hope this helps.

8 0
1 year ago
Other questions:
  • About ___% of children score within one standard deviation above or below the national average in intelligence.
    5·1 answer
  • If the test statistic for a small sample difference of means test is t* = 2.045, we could reject the Null Hypothesis at alpha =
    9·1 answer
  • 5(x + 4) = 4(x -6) |<br><br><br>How to do this problem
    10·1 answer
  • Which is the first thing that would happen if a plant could NOT obtain carbon dioxide? A It would not be able to reproduce. B It
    5·1 answer
  • ______ behavior expected from every professional​
    12·1 answer
  • Which areas of a business would most benefit from using the Workday platform?
    7·1 answer
  • In which generation microprocessor was developed short answer of computer science​
    7·1 answer
  • Given a sorted list of integers, output the middle integer. assume the number of integers is always odd.
    11·1 answer
  • Write a program that produces the following output: CCCCCCCCC ++ ++ CC ++ ++ CC ++++++++++++++ +++++++++++++++ CC ++++++++++++++
    14·1 answer
  • Which code block is an example of a motion block in scratch?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!