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
Triss [41]
2 years ago
9

Write a program that asks the user to enter a number of seconds. There are 60 seconds in a minute. If the number of seconds ente

red by the user is greater than or equal to 60, the program should display the number of minutes in that many seconds. There are 3,600 seconds in an hour. If the number of seconds entered by the user is greater than or equal to 3,600, the program should display the number of hours in that many seconds. There are 86,400 seconds in a day. If the number of seconds entered by the user is greater than or equal to 86,400, the program should display the number of days in that many seconds.
Computers and Technology
1 answer:
frez [133]2 years ago
8 0

Answer:

// here is code in c.

#include <stdio.h>

// main function

int main()

{

// variable to store seconds

long long int second;

printf("enter seconds:");

// read the seconds

scanf("%lld",&second);

// if seconds is in between 60 and 3600

if(second>=60&& second<3600)

{

// find the minutes

int min=second/60;

printf("there are %d minutes in %lld seconds.",min,second);

}

// if seconds is in between 3600 and 86400

else if(second>=3600&&second<86400)

{

// find the hours

int hours=second/3600;

printf("there are %d minutes in %lld seconds.",hours,second);

}

// if seconds is greater than 86400

else if(second>86400)

{

// find the days

int days=second/86400;

printf("there are %d minutes in %lld seconds.",days,second);

}

return 0;

}

Explanation:

Read the seconds from user.If the seconds is in between 60 and 3600 then find the minutes by dividing seconds with 60 and print it.If seconds if in between 3600 and 86400 then find the hours by dividing second with 3600 and print it. If the seconds is greater than 86400 then find the days by dividing it with 86400 and print it.

Output:

enter seconds:89

there are 1 minutes in 89 seconds.

enter seconds:890000

there are 10 days in 890000 seconds.

You might be interested in
Which 3 file formats can be used for importing lists directly into quickbooks online?.
Natali5045456 [20]

Answer:

Explanation:

QBO

IIF

QBJ

8 0
1 year ago
Why are medical coders using encoded software
EastWind [94]
To keep the medical records confidential otherwise, hackers would take advantage of them and sell them to the highest bidder 
3 0
3 years ago
Which group allows you to add notes to your presentation?Ella has finished drafting her presentation. What should she do next?
liq [111]
Ella should view the presentation as a slideshow to see how it will look to her audience. 
6 0
3 years ago
Read 2 more answers
Where is permanent data in the computer stored? Whenever Jim starts his laptop, he sees some commands and numbers appearing on h
Wittaler [7]

the operating system ithink

4 0
3 years ago
What is this affect in photography?? pls help!!
dlinn [17]
Its called tilt shift effect
3 0
3 years ago
Other questions:
  • What are a few benefits of virtualization?<br> How do they benefit ?
    9·1 answer
  • When planning your educational and career path, it makes sense to consider where you want to work and what type of work you want
    14·1 answer
  • Universal Containers is tracking the interviewer's ratings of candidate in Salesforce. They would like to easily link the Candid
    5·1 answer
  • Which of the following correctly describes the function of an IP address
    13·1 answer
  • For the questions below, consider a class called ChessPiece. This class has two instance data, String type and int player. The v
    13·1 answer
  • I will give Brainliest to the best answer, I need urgent HELP
    7·1 answer
  • Explain the developments RAM since it was created in 1968 til today.
    7·1 answer
  • Anyone wanna join zoo m???????​
    10·2 answers
  • Decrypt this message: P ht uva h zwf
    13·1 answer
  • Identify 5 internal and external hardware components of a server
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!