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
qwelly [4]
3 years ago
7

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:
konstantin123 [22]3 years ago
4 0

Answer:

// here is code in c++.

// include headers

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variables

long long int minutes,years,days;

long long int s;

cout<<"please enter the minutes:";

 // read the minutes

cin>>minutes;

 // make a copy

s=minutes;

 // calculate days

days=minutes/1440;

 // calculate years

years=days/365;

 // calculate remaining days after years

days=days%365;

// print the result

cout<<s<<" minutes is equal to "<<years<<" years "<<days<<" days."<<endl;

return 0;

}

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 214 days.

You might be interested in
How is a ink pen better than a digital pen.
Hatshy [7]
It depends on what digital pen you're using.
Ink pens are better because they don't run out of ink like digital and you dont have to re-charge every time.
Hope this helps!:)<span />
8 0
4 years ago
The efficinecy for solving the towers of hanoi problem recursively
V125BC [204]

Answer:

B.O(2n)

Explanation:

The time complexity of solving towers of hanoi problem recursively is O(2n) because there are two recursion calls in the solution of tower of hanoi.First recursive call to move n-1 disks to from source to helper then the user moves nth disk from source to destination after that recursion moves n-1 disks from helper to destination using source as helper rod.So each recursive call make two more recursive call this makes the time complexity be O(2n).

8 0
4 years ago
Please help me !!!!!!!
Helen [10]

Answer:

is this Espaniol??

Explanation:

6 0
3 years ago
PLEASE HELP ITS CODING AND I INCLUDED A SCREENSHOT OF WHAT TO DO
madam [21]

Answer:

I need to have better photos in order to assist you...

Explanation:

I will attempt to get back with you if you can provide more clearer photos.

6 0
3 years ago
Read 2 more answers
You know a Linux command will perform a desired function for you, but you cannot remember the full name of the command. You do r
Blababa [14]

Answer:

The correct answer is option  a. man –k flush.

Explanation:

When you want to flush a variable from your system you should use the command flush in linux.

The command you'll be typing in the command prompt of the linux is man -k flush.

Hence the answer to this question is option a. man -k flush.

6 0
3 years ago
Other questions:
  • Is this picture the CPU, RAM, CD, or Operating System
    15·1 answer
  • What type of stud is placed below a windowsill to support its weight
    12·1 answer
  • What is entered into a cell that is typically numeric and can be used for calculations?
    9·2 answers
  • True or False: In Google Cloud IAM: if a policy applied at the project level gives you Owner permissions, your access to an indi
    8·1 answer
  • WILL GIVE BRAINLIEST
    5·2 answers
  • Algorithm and flowchart to find the perimeter and area of square​
    15·1 answer
  • What's up with this new update?
    13·2 answers
  • ​what is the difference between a normal mouse and trackball? What do you think. ​​​​
    7·1 answer
  • What is modern? explain​
    11·1 answer
  • Trong mạng internet, chúng tôi thay đổi công nghệ mạng LAN sang một công nghệ
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!