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
Alenkasestr [34]
2 years ago
13

Write a java program that prompts the user to input the elapsed time for an event in hours, minutes, and seconds. The program th

en outputs the elapsed time in seconds.
Computers and Technology
1 answer:
Arisa [49]2 years ago
6 0

Answer:

import java.util.*;

class seconds

{

public static void main (String[] args)

{

    Scanner takeinput=new Scanner(System.in);//creating a scanner object for taking input.

    int hour,min,sec; //declaring 3 variables for hour , minutes and seconds.

    System.out.println("enter hours");

    hour=takeinput.nextInt();//taking input of hours..

    System.out.println("enter minutes");

    min=takeinput.nextInt();//taking input of minutes..

    System.out.println("enter seconds");

    sec=takeinput.nextInt();//taking input of seconds..

    int tot_time_sec=(hour*60*60)+(min*60)+sec; //calculating time in seconds in variable tot_time_sec.

    System.out.println("Total time in seconds is "+tot_time_sec);//pritning total time in seconds..

}

}

For input:

7

20

45

Output is:-

Total time in seconds is 26445..

Explanation:

Above is the code for finding the time in seconds.I have taken three integer variables hour,min and sec for taking input of hours ,minutes and seconds. After taking input i have taken an integer variable tot_time_sec to store the calculated time in seconds and after that printing tot_time_sec.

You might be interested in
How to jail break iphone 7 with <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7617023602">[email&#160
GarryVolchara [31]
I do not think so i honestly do not know
6 0
3 years ago
Read 2 more answers
Find the median and mean of the data set below: 29 17 40 12 29
quester [9]

answer:

median: 29

arrange the data in ascending order, and the median is the value in the middle. If there are an even number of values, the median would be the product of the two middle numbers. (12, 17, 29, 29, 40)

mean: 25.4

the mean of a set of numbers is the sum divided by the number of terms.

12 + 17 + 29 + 29 + 40 = 127 / 5 = 25.4

hope this helped!

6 0
2 years ago
Diligent people are as concerned with the ____ as the ___ of their work
Ksivusya [100]

Answer:

Duration; quality/correctness.

Explanation:

Diligence is a way of life. It adds value to a piece of work. When a work is diligently done, it is said to be good or almost perfect. A diligent work evaluates all errors and corrects them from start to finish.

A diligent person takes time to analyse and complete a task to perfection. But diligence also comes with speed. A diligent work as to meet up with deadlines. Diligent people are also as concerned with the speed or duration of their work as to the correctness and quality.

5 0
2 years ago
Jordan has been asked to help his company find a way to allow all the workers to log on to computers securely but without using
lana66690 [7]

Answer:

Webcam

Explanation:

A webcam is mainly used for taking images or videos from the computer. the webcam is a combination of two basic words i.e. web and camera. webcam can be connected to any computer via USB. It can be mounted on the desktop and sometimes it comes inbuilt on the laptops.

A webcam is also used for face recognition function to login to a computer system.

so according to the scenario, the most appropriate answer is a webcam.

6 0
3 years ago
A program written in a(n) procedural language consists of sequences of statements that manipulate data items. __________________
Alenkasestr [34]

Answer:

true.

Explanation:

According to my research on information technology, I can say that based on the information provided within the question the statement is completely true. Procedural programming is a widely used paradigm that basically gives the program a set of routines or specifications, and the program mixes and matches them as they continuously repeat the process. It is used in many areas, including video game development.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
3 years ago
Other questions:
  • Running fewer applications at once is a way to resolve which type of bottleneck?
    9·1 answer
  • To move a file, you use the ____ command along with the source file name and destination name
    5·1 answer
  • The place where one printed page ends and the next page begins.
    15·1 answer
  • Christine wants to send a quick communication to all department managers. She should send a _____. report
    13·2 answers
  • What is the local portion of the e-mail address below? <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="
    14·1 answer
  • True or false? A medical assistant can check for available exam rooms and providers using an electronic scheduling system.
    8·1 answer
  • Which of the following lists contains the five essential elements of a computer? Group of answer choices: 1. inputs, returns, pr
    11·1 answer
  • Which of the following statements is correct?
    11·1 answer
  • True or false, USBs are slower than RAM.
    15·1 answer
  • Lattice-based access controls use a two-dimensional matrix to assign authorizations. What are the two dimensions and what are th
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!