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
FrozenT [24]
3 years ago
11

Write a program that accepts a time as an hour and minute. Add 15 minutes to the time, and output the result. Example 1: Enter t

he hour: 8 Enter the minute: 15 It displays: Hours: 8 Minutes: 30 Example 2: Enter the hour: 9 Enter the minute: 46 It displays: Hours: 10 Minutes: 1
Computers and Technology
1 answer:
Liula [17]3 years ago
5 0

Answer:

Explanation:

C++ Code

#include <iostream>

#include <cstdlib>

using namespace std;

int main(){

double hour,minute;

cout<<"Enter Hours :";

cin>>hour;

cout<<"Enter Minutes :";

cin>>minute;

minute = minute+15;

if(minute >=60){

 hour++;  

 minute = minute-60;

}

if(hour>23){

 hour = 0;

}

cout<<"Hour: "<< hour<< " Minutes: "<<minute;

return 0;  

}

Code Explanation

First take hours and minutes as input. Then add 15 into minutes.

If minutes exceeds from 60 then increment into hours and also remove 60 from minutes as hours already incremented.

Then check if hours are greater then 23 then it means new day is start and it should be 0.

Output

Enter Hours :9

Enter Minutes :46

Hour: 10 Minutes: 1

You might be interested in
Where is the risk of someone intercepting another person’s online activity the greatest?
sergey [27]

social networking site

3 0
3 years ago
Help plzzzzzzzzzzzzzzzzzzzzzzzzz
Reil [10]

B, Parallel ports are faster than serial ports.

A parallel port can move a set of 8 bits at a time on eight different wires, it uses a 25 pin connector, called a DB-25 connector, whereas a serial port only has a DB-9 connector.

7 0
3 years ago
A major retailer wants to enhance their customer experience and reduce losses
Mrac [35]

Answer:

Predict Demand

Explanation:

The type of Artificial Intelligence (Al) solution that would be suitable for solving this problem is "Predict Deman"

By predicting the demand of the potential consumer through the Artificial intelligence solution the retailer would be able to eliminate leftover out-of-stock scenarios because the adequate quantity of the products or demands will be provided thereby enhancing customers' experience arising from out-of-stock scenarios and reducing losses arising from the leftover.

5 0
3 years ago
Mike logged into a shopping website and entered his username and password. Which protocol will the website use to verify his cre
mars1129 [50]

Answer:

I think it is email or password

3 0
2 years ago
Panarchy considers the big picture because, in reality, smaller systems are embedded inside of larger systems and they influence
SVEN [57.7K]

Answer:

The connection will be represented by the pair of "Revolt" and "Remember".

Explanation:

  • In a nested structure, the panarchy system links the evolutionary periods. Several connections may have occurred between levels at one point of the engineered process and stages at another.The tags ' revolt ' and ' remember ' are two major connections.
  • Invent, explore, and check the smaller, quicker, clustered levels, while the bigger, slower rates preserve and maintain stored system dynamic allocation.
  • The slower and larger levels, therefore, set conditions under which quicker and smaller ones work.

Therefore, it's the right answer.

4 0
4 years ago
Other questions:
  • The ______ identifies the path for the currently open folder
    8·2 answers
  • Write a program for Horizon Phones, a provider of cellular phone service. Prompt a user for maximum monthly values for talk minu
    6·1 answer
  • A web __________, such as internet explorer or mozillaâs firefox, allow users to access the world wide web.
    10·1 answer
  • Write an if statement that assigns 100 to x when y is equal to 0.
    7·1 answer
  • From the set ( 5 , 7 , 9 , 11 , 13 make the inequality w - 4 &lt; 8 true
    12·1 answer
  • What is the best way to locate where my C program gets into an infinite loop
    5·1 answer
  • The term "exception propagation" means:
    5·1 answer
  • Update thejavafile names to include your initials at the end, send .java file only.1. Completein-place heapSort, which takes an
    11·1 answer
  • Actividades que puedes Aser con un martillo y su explicación
    8·1 answer
  • You hide three worksheets in a workbook and need to unhide them. How can you accomplish this?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!