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
Which is the most common way to install memory in a laptop?
alina1380 [7]

install memory requires you to take off the bottom portion of the laptop.

7 0
3 years ago
What kind of company would hire an Information Support and Service employee?
Anni [7]
A service company would hire an Information Support and Service employee.

hope it helps you!
6 0
3 years ago
Read 2 more answers
Alice and Bob are unknown to each other. Alice wants to send an encrypted message to Bob. So it chooses a KDC which is known to
kakasveta [241]

3. ¿Qué mensaje recupera Bob después del descifrado? Mostrar como caracteres hexadecimales.

Respuesta: la clave con el mensaje :

5 0
2 years ago
You can use _____ to track the state of each user in the application.
anastassius [24]

Answer:

session state

Explanation:

Session state in the context of NET is a method keep track of a user session. Session states allow a developer to store data about a user as he or she navigates through ASP.NET web pages.

3 0
3 years ago
The "A" in the CIA triad stands for "authenticity". True False
mihalych1998 [28]

Answer: False, the "A" in the CIA triad stands for <em>availability</em><em>.</em>

The CIA triad also know as the Confidentiality, integrity and availability triad, is known as a model which is designed in order to implement and enforce policies in regards to information security. This model is also referred as the availability, integrity and confidentiality model i.e AIC triad. This is done in order to avoid confusion with Central Intelligence Agency i.e. CIA.

8 0
3 years ago
Other questions:
  • Sahil is making a graphic novel in which the villain plans to reduce the rate at which energy is released from the Sun. The vill
    7·2 answers
  • Broker Ray is closely acquainted with the Subdivision Heights neighborhood of his town. Over the year, Ray has made it a practic
    7·1 answer
  • Here's a thought: Why does your Brainly ranking keep going down?
    6·2 answers
  • Quick SearchLinks to an external site. lets you refine or narrow your search results using links on the right side of the screen
    5·1 answer
  • Encryption Using Rotate Operations Write a procedure that performs simple encryption by rotating each plaintext byte a varying n
    10·1 answer
  • Does anyone know the point of gradpoint?
    8·1 answer
  • Who made the first electronic device?
    14·1 answer
  • Describe FIVE distinct features of multi-threaded programming. Your answer should be language independent. g
    9·1 answer
  • List 5 differences between monitors and printers​
    14·1 answer
  • Which command os used to find a particular word in a document ?<br>​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!