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
Write a program in c++ to displaypascal’s triangle?
Harman [31]

<u> C++ Program to Print Pascal's Triangle</u>

 #include<iostream> //header file

using namespace std;

//driver function  

int main()

{

   int r;/*declaring r for Number of rows*/

   cout << "Enter the number of rows : ";

   cin >> r;

   cout << endl;

 

   for (int a = 0; a < r; a++)

   {

       int value = 1;

       for (int b = 1; b < (r - a); b++) /*Printing the indentation space*/

       {

           cout << "   ";

       }

       for (int c = 0; c <= a; c++) /*Finding value of binomial coefficient*/

       {

           cout << "      " << value;

           value = value * (a - c) / (c + 1);

       }

       cout << endl << endl;

   }

   cout << endl;

   return 0;

}

<u>Output</u>

<u>Enter the number of rows :  5</u>

                 1

              1      1

           1      2      1

        1      3      3      1

     1      4      6      4      1

7 0
3 years ago
Jennifer has her own business. Recently, she has ventured into creation of a new line of apparel. She has created a new symbol t
Zolol [24]
I am think that is the anwer trademark
3 0
3 years ago
Read 2 more answers
What type of database contains multiple collections of data that are related to one another cells
statuscvo [17]
The different types<span> of </span>databases<span> include operational </span>databases<span>, end-user </span>databases<span>, distributed </span>databases<span>, analytical </span>databases<span>, relational </span>databases<span>, hierarchical </span>databases<span> and </span>database<span> models. 

Source Bing</span>
7 0
3 years ago
what is the term used when a virus takes control of features on your computer and transports files or information automatically?
Akimi4 [234]

Answer: a "worm"

Explanation:

3 0
3 years ago
The management of your team wants you to run descriptive statistics on the relative skill of your team from 2013-2015. In this p
Brilliant_brown [7]

Answer:

I will suppose data here ,when you run your you just need to use your own statistics data for mean ,median, variance and standard deviation

data1 = {1, 3,4,7,12,3,45}

x = np.arange(20)

print("Your Team's Relative skill in 2013 to 2015")

print("descriptive statistics including the mean, median, variance, and standard deviation for the relative skill of your team")

mean = your_team_df['elo_n'].mean(data1)

median = your_team_df ['elo n'].median(data1)

variance = your_team_df ['elo n']. tvar(x)

stdeviation = your_team_df ['elo n'].stdev(data)

print('Mean =' , round(mean, 2))

print('Median =' , round(median, 2))

print('variance =' , round(variance, 2))

print('Standard deviation =' , round(stdeviation, 2))

3 0
4 years ago
Other questions:
  • What do we call the distribution and access of illegal copies of digital books??
    10·1 answer
  • How do you change brightness on acer laptop?
    7·1 answer
  • There is an enormous amount of information on the Internet that is automatically separated into good content and not-so-good con
    15·1 answer
  • URGENT HELP PLEASE
    13·1 answer
  • What is the software that provides the mechanisms to access a database called?
    6·1 answer
  • Filtering data in Excel Online keeps all data on the screen and highlights the content that fits your criteria.
    9·1 answer
  • An input value has to be greater than 18 and less than 65 if a driving license is to be approved for issue. What type of input c
    11·1 answer
  • Give the uses of Word’s mail merge.
    8·1 answer
  • A _____ is relatively inexpensive to install and is well-suited to workgroups and users who are not anchored to a specific desk
    14·1 answer
  • Out of all the social media tools available today, the best tool to start when beginning your social marketing efforts is which
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!