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
What is 4991 rounded to the nearest thousand
evablogger [386]

Answer:

5000

Explanation:

5 0
3 years ago
Read 2 more answers
At some point in your driving career, you will most likely be faced with an oncoming vehicle swerving into your travel lane. tru
aleksley [76]

I believe the answer is True.

7 0
3 years ago
Which of the following activities would contribute the most to global warming?
stich3 [128]
Snowmobiling around a National park
5 0
2 years ago
Read 2 more answers
Andy wants to change some of the components in his old computer system.he had recently upgraded the motherboard and he now wishe
ladessa [460]

Looking at the images and the boxes, it goes like this;


To add external functionality of external backup, you would probably have something removable from the computer accessable. This means that the Optical Drive would add functionality of external backup, and the first tile goes there.


A processor is what does the general computations inside a laptop/desktop computer and processes information as the name implies. Upgrading the processor makes it go faster. The second tile would go to the processor.


The third one need no further explanation and would go to the Hard Drive, but just keep in mind that the Hard Drive stores all the information on your computer (i.e. Applications, Photos, etc.).


Hope this helps!

6 0
3 years ago
Read 2 more answers
How does one commit accounts receivable fraud?
disa [49]
The answer is B) bill customers for the amount they purchased, but record lower purchases in the ledger and pocket the money. A fraud is one of two types of mistake in the recording process which done with a deliberate intention. The account receivable department responsible for recording sales transaction and billing the customers. Thus, the account receivable fraud can be committed in this process.
5 0
2 years ago
Read 2 more answers
Other questions:
  • Match the part of motherboard to its function
    15·1 answer
  • how to make assignment on power point plz cntct me and help me all about power point and my assignment is prime ministers of pak
    13·1 answer
  • What type of device is characteristic of an enterprise environment?
    7·1 answer
  • Design and implement an algorithm that gets a list of k integar values N1, N2,...Nk as well as a special value SUM. Your algorit
    10·1 answer
  • Light is a key formal element that film artists and technicians carefully manipulate to create mood, reveal character, and conve
    15·1 answer
  • Two-dimensional random walk (20 points). A two-dimensional random walk simulates the behavior of a particle moving in a grid of
    14·1 answer
  • Identify some advantages of using Excel over lists, paper files, or simple word documents? Describe some disadvantages of using
    15·1 answer
  • Write a program that uses a dictionary to store students birthdays. Your program should ask the user what their name is, and loo
    11·1 answer
  • Here is what my rob-lox user USED to look like, btw what is better, Samsung or apple?
    13·2 answers
  • Briefly explain the emerging trends in micro computer technology in relation to size
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!