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]
3 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]3 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
What do you think about the future of computers?​
Strike441 [17]

Answer:

what do i think about future of computers

Explanation:

i think the future of computer will more be advanced

maybe creating robots to help humans with lots of things as pollution,littering and all sorts of things help us explore deeper parts of the ocean and get more accurate data and maybe be able to stop climate change,maybe stop deforestation, and be able to fix all the horrible thing we did to our earth. this is not proven facts but this is how i think about the future of computer

Idk if that helps

8 0
3 years ago
what is the restaurant with the black pom tree and yellow backround three letter name from hi guess the restaurant
vekshin1
In 'N' Out, and KFC (Kentucky Fried Chicken)
7 0
3 years ago
Read 2 more answers
Select three advantages of cloud computing.
777dan777 [17]

Answer:

easily managed, large amount of storage capacity, great flexibility

Explanation:

5 0
3 years ago
True or false = the order of cannot be changed in slide shorter view ,true or false =menu bar is located just below the title ba
DIA [1.3K]

Answer:

True or false = the order of cannot be changed in slide shorter view ,true or false =menu bar is located just below the title bar plz solve thisss

3 0
3 years ago
Read 2 more answers
Who watches the show gravity falls, if you do, if you play the theme song for the first episode backwards you get a hiding messi
Yakvenalex [24]
I don’t really knowwww but thanks
4 0
3 years ago
Read 2 more answers
Other questions:
  • Wendy is an attacker who recently gained access to a vulnerable web server running Microsoft Windows. What command can she use t
    9·1 answer
  • The likelihood of the occurrence of a vulnerability multiplied by the value of the information asset - the percentage of risk mi
    12·1 answer
  • When you make a pointer variable im C++, is star label a must?
    9·1 answer
  • What does zooming do? A. Changes your view of the Frame Editor to be closer or farther away B. Changes your view of the Event Ed
    12·1 answer
  • A haiku is a three-line poem in which the first line contains five syllables, the second line contains seven syllables, and the
    12·1 answer
  • Software that instructs the computer how to run applications and controls the display/keyboard is know as the
    8·1 answer
  • A(n) __________ is a server with the original copy of the data that others need.
    12·1 answer
  • Krya needs help deciding which colors she should use on her web page. What can she use to help her decide.
    11·1 answer
  • Multi-part question:
    13·1 answer
  • WHATS 5X750 i really dont even know that questiob
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!