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
Write a set of nested loops that display 10 rows of # characters. There should be 15 # characters in each row.
Andrews [41]

Answer:

Following are the code to this question:

public class M//defining class M

{

public static void main(String[] as)//defining main method

{

    int i,j;//defining integer variable

for (i= 1; i <=10; i++)//defining for loop for print column    

{

for (j = 1; j<=15; j++)//defining for loop for print rows

{

System.out.print("#");//print # value

}

System.out.println();//print space

}

}

}

Output:

###############

###############

###############

###############

###############

###############

###############

###############

###############

###############

Explanation:

The code defines a class "M" and the main method is defined within a class and two integer variables I and j" are defined within the primary procedure, while the next step defines two for a loop.  

In the first loop, the column value is printed, and a further loop that prints the row value is declared inside the loop.  

5 0
3 years ago
Is the cell phone changing our views about polite and impolite behavior? For example,
Otrada [13]

a cell phone is changing our views in both polite and unpolite ways because these days I see people at dinner tables on their phones taxting and not actually socializing with the people around them but at the same time people who like other people posts on instagram and wright good comments are being very polite to the person who posts it.

4 0
3 years ago
Read 2 more answers
Client/server awareness. Visit three local stores in your neighborhood or mall and notice the information technology in the stor
Kaylis [27]

local stores in neighborhood do not have computerized cash registers but they may have cameras if they are in a bad neighborhood. inventory is controlled by checking the shelves.


the Qs about computers, servers and clients are for national chain stores. they use clients at each store which are connected to the central servers at HQ. employees need special training as the system is complicated. the whole system is maintained by their IT department.


7 0
3 years ago
Read 2 more answers
When creating a multi-dimensional array dynamically in C/C++ the Memory Manager will go to great pains to make sure the array is
yuradex [85]

Answer:

Here the statement is false.  

Explanation:

In C/C++, we can define multidimensional arrays in simple words as an array of arrays. Data in multidimensional arrays are stored in tabular form (in row-major order).  

General form of declaring N-dimensional arrays:  

data_type  array_name[size1][size2]....[sizeN];  

data_type: Type of data to be stored in the array.  

          Here data_type is valid C/C++ data type

array_name: Name of the array

size1, size2,... ,sizeN: Sizes of the dimensions.

Foe example:

Two dimensional array:

int two_d[10][20];  

Three dimensional array:

int three_d[10][20][30];

8 0
3 years ago
How does the occupational outlook affect the monetary benefits of a career
Ksivusya [100]
If there are changes to the responsibilities in a career, the typical outcome will change.
4 0
3 years ago
Other questions:
  • Universal Containers recently rolled out a Lightning Knowledge implementation; however, users are finding unreliable and unrelat
    6·1 answer
  • Optimally, the __________ guides investment decisions and decisions on how ISs will be developed, acquired, and/or implemented.
    6·1 answer
  • Which of the following illustrates an example of a Boolean data type?
    15·1 answer
  • In order to do a binary search on an array Group of answer choices you must first do a sequential search to be sure the element
    5·1 answer
  • What is not a common purpose for a research report?
    5·2 answers
  • What is a orogram to block access to websites
    15·1 answer
  • A(n) ____________________ is hardware or software that blocks or allows transmission of information packets based on criteria su
    13·1 answer
  • EX 3.8 Write code to declare and instantiate an object of the Random class (call the object reference variable rand). Then write
    6·1 answer
  • Which of these components is a part of the Central Processing Unit (CPU) of a computer?
    11·2 answers
  • 11 Select the correct answer. Which external element groups items in a design?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!