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
Vadim26 [7]
3 years ago
9

Write a method that accepts a number of seconds and prints the correct number of hours, minutes, and seconds.

Computers and Technology
1 answer:
tiny-mole [99]3 years ago
7 0

Answer:

This solution is implemented in Java

public static void timme(int seconds) {

       int hours = seconds/3600;

       System.out.println("Hours: "+hours);

seconds = seconds - hours * 3600;

       int minutes = seconds/60;

       System.out.println("Minutes: "+minutes);

seconds = seconds - minutes * 60;

       System.out.println("Seconds: "+seconds);

   }

   

Explanation:

This method defines the method along with one parameter

public static void timme(int seconds) {

This calculates hours from the seconds

       int hours = seconds/3600;

This prints the calculated hours

       System.out.println("Hours: "+hours);

This calculates the seconds remaining

    seconds = seconds - hours * 3600;

This calculates the minutes from the seconds left

       int minutes = seconds/60;

This prints the calculated minutes

       System.out.println("Minutes: "+minutes);

This calculates the seconds remaining

    seconds = seconds - minutes * 60;

This prints the seconds left    

  System.out.println("Seconds: "+seconds);

   }

You might be interested in
Match the following tasks with their appropriate timing.
Oliga [24]

Answer:

3. 1. 2. daily, weekly, monthly

Explanation:

8 0
3 years ago
Stages of reverse engineering
ivann1987 [24]

Answer:

Capture Data, Refine the Model, and then Manufacture it.

Explanation:

5 0
3 years ago
You are planning trip to South America and and are worried about your devices with private keys being stolen. So you decide to s
scZoUnD [109]

Incomplete question. Here's the remaining part of the question.

a. <sig> <pubKey>

b. <password>

c. <sig> <password>

d. <pubKey> <password>

Answer:

<u>a</u>

Explanation:

Remember, Bitcoin also has its script code which is called ScriptPubkey.

To redeem a transaction implies using the script

<sig> <pubKey>

for the receiving Bitcoin address.

Put simply, the purpose of this script is to lock (redeem) the transaction using the public key (bitcoin address).

7 0
4 years ago
Which expression correctly determines that String s1 comes before String s2 in lexicographical order
Assoli18 [71]

Options :

A.) s1 < s2

B.) s1 <= s2

C.) s1.compareTo(s2) == −1

D.) s2.compareTo(s1) < 0

E.) s1.compareTo(s2) < 0

Answer: E.) s1.compareTo(s2) < 0

Explanation: Lexicographical ordering simply means the arrangement of strings based on the how the alphabets or letters of the strings appear. It could also be explained as the dictionary ordering principle of words based on the arrangement of the alphabets. In making lexicographical comparison between strings, the compareTo () method may be employed using the format below.

If first string = s1 ; second string = s2

To compare s1 with s2, the format is ;

s1.compareTo(s2) ;

If s1 comes first, that is, before s2, the method returns a negative value, that is a value less than 0 '< 0', which is the case in the question above.

If s2 comes first, that is, before s1, the method returns a positive value, that is a value greater than 0 '> 0'.

If both are s1 and s2 are the same, the output will be 0.

8 0
3 years ago
Code Example 8-1
damaskus [11]

Answer:

Option A: FileNotFoundError

Explanation:

FileNotFoundError is an exception which is thrown when a program fail to open a specified file. The root causes of this type of error can be:

  1. The directory path to locate a target file is wrongly defined in our code due to a typo on the file name or misuse of relative directory path, such as ../ and ./ which denote two different paths.
  2. For some reasons, a target file is misplaced in a wrong directory.

Any one of the above reasons can lead to the exception to be thrown when the file doesn't exist.

6 0
3 years ago
Other questions:
  • When used as parameters, _________ variables allow a function to access the parameter’s
    10·1 answer
  • What is a locally stored url, or the address of a file or internet page saved as a shortcut?
    10·1 answer
  • The internet is a worldwide assembly of computer
    11·1 answer
  • The hotspot created by MiFi is password protected and can be used to connect Wi-Fi devices located within ____ feet of the MiFi
    9·1 answer
  • Which term describes the degree to which a network can continue to function despite one or more of its processes or components b
    14·1 answer
  • when you enter a formula in a cell the result of the calculation displays in a cell. how do views of formula after entering it?
    9·2 answers
  • What is the benefit of making an archive folder visible in the Outlook folder list?
    6·1 answer
  • When creating envelopes, how will you adjust the layout?
    10·2 answers
  • Write a program (using functions) starting from directives to compute and display the transpose of a matrix of dimension m x n.
    13·1 answer
  • (Correct Answer Recieves Brainliest)
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!