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
Rashid [163]
3 years ago
13

Create a Time Conversion application that prompts the user for a time in minutes and then displays the time in hours and minutes

. Be sure to consider times whether the number of minutes left over is less than 10. For example, 184 minutes in hour:minute format is 3:04 (Hint: use the modulus operator). The application output should look similar to:
Computers and Technology
1 answer:
vagabundo [1.1K]3 years ago
7 0

Answer:

The following are the program in the Java Programming Language.

//import the following class

import java.util.Scanner;

//define class

public class TimeConversion  

{

 //define main function

 public static void main(String[] args)  

 {

   //create the object of the scanner class

   Scanner s = new Scanner(System.in);

   //print message

   System.out.println("Enter the minutes: ");

   //get input in the variable

   int t=s.nextInt();

   //initialize in the variable

   int hr=t/60;

   //initialize in the variable    

   int min=t%60;

   //declare the string type variable

   String result;

   //initialize in the variable

   result=""+hr;

   //check that the variable is less than 10

   if(min<10)

     //then, initialize this

     result=result +":0"+min;

   //otherwise

   else

     //initialize this

     result=result +":"+min;

   //print the result

   System.out.println(result);

 }

}

<u>Output</u>:

Enter the minutes:

184

3:04

Explanation:

<u>The following are the description in the program</u>.

  • Firstly, import the scanner class and define the class 'TimeConversion', inside the class, we define the main method and inside the main method.
  • Create the object of the scanner class 'c' and then get input from the user in the variable 't' through the scanner class object.
  • Then, declare the variable 'hr' and initialize the value input divided by 60. Declare the variable 'min' and initialize the value input mod by 60.
  • Declare the string data type variable 'result' then, check that the variable 'min' is less than 10 then, initialize the following format in the variable 'result' and otherwise the initialize the other formate in the variable 'result'.
  • Finally, we print the variable 'result'.
You might be interested in
How does segmenting your network increase network security?
lys-0071 [83]

Answer:

By segmenting networks, it becomes easier to protect the most sensitive data that you have on your internally-facing network assets. The creation of a layer of separation between servers containing sensitive data and everything outside of your network can do wonders to reduce your risk of data loss or theft.

Explanation:

PLEASE MARK ME AS BRAINLIEST

5 0
3 years ago
Write a pseudocode to add the first 100 even numbers.
Allushta [10]

Even numbers are numbers whigh are divisible by 2. Therefore, the first even number is 2. A pseudocode which adds the first 100 even numbers can be written thus :

counter = 0

sum = 0

interval = 2

while counter < 100 :

sum = sum + interval

interval += 2

counter +=1

print(sum)

  • A counter takes count of the number of values summed

  • Initializes a variable which holds the sum of even values

  • Since even numbers are divisible by 2; every factor ; increase every added value by 2

  • The program ends once counter is 100

Learn more : brainly.com/question/25327166

6 0
2 years ago
A(n) ____ is a named collection of data that exists on a storage medium.
MissTica
S a named collection of data that exists on a storage medium<span>.</span>
6 0
4 years ago
Where should the VPN concentrator be installed?
zmey [24]
C, using a firewall make sures no viruses enter your device while setting up the vpn
7 0
2 years ago
Read 2 more answers
What type of switch is used to combine multiple network connections into a single link?a. core switchb. gateway switchc. aggrega
hichkok12 [17]

Answer:

C. Aggregation switch.

Explanation:

Aggregation switch is a type of switch used to combine multiple network connections into a single link.

In Computer Networking, Aggregation switches are primarily designed to be used for connecting the Top-of-Rack (ToR) switches to a core switch or router, as the case may be.

Generally, the core switch is typically placed at the top of the data center network architecture topology.

An aggregation switch is usually designed to be large in size and has a lot of interfaces or ports for the connection of multiple networks into a single logical link.

<em>Additionally, the connections are mainly done in parallel in order to prevent total downtime or redundancy in a network, as well as to enhance the throughput than what is obtainable in a single network. </em>

8 0
3 years ago
Other questions:
  • Create a project for a sandwich shop. The project, named SalsSandwiches, allows a user to use a ListBox to choose a type of sand
    5·1 answer
  • _______ is the command for opening a spreadsheet object in a separate spreadsheet window. A. Edit &gt; Edit Data B. Worksheet &g
    10·2 answers
  • If you want to wrap text so that it fits a particular cell size, which formatting section would you use?
    9·2 answers
  • A researcher wants to do a web-based survey of college students to collect information about their sexual behavior and drug use.
    7·1 answer
  • Name this<br><br>The feature allows you to add text/picture in the background of the document. ​
    11·1 answer
  • What can detect 8 colors?
    12·2 answers
  • Wake up to reality. Nothing ever goes as planned in this world. The longer you live,the more you realize that only pain, sufferi
    5·1 answer
  • This my question for programming class
    10·1 answer
  • How can you have a safe browsing experience?
    10·2 answers
  • Wi-Fi Protected Access (WPA) fixes critical vulnerabilities in the earlier wired equivalent privacy (WEP) standard. Understandin
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!