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]
2 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]2 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
Consider the following code: def tryIt(b): for i in range(len(b)): b[i] = b[i] + 100 #***********MAIN************ x = [] x = [56
WINSTONCH [101]

Answer: I took a high school robotics class when I was in 5th grade and I don't even understand your code there aren't any instructions other than <em>"</em><em><u>Consider</u></em><u>"</u> the following code you may want to improve your question

7 0
2 years ago
Interactive television with video-on-demand capabilities changes how people watch television and how consumers access the Intern
Alex787 [66]

Answer:

High learning

Explanation:

High Learning means that a product require significant customer education before customers understand how the product functions and that may make the product stay longer in the introduction stage whilst the customers are being familiarize with it. Examples are microwave ovens.

6 0
3 years ago
During which phase of system development would you acquire any necessary hardware and software?
solmaris [256]

During the <u>design</u> phase of system development, you would acquire all the necessary hardware and software.

<h3>What is SDLC?</h3>

SDLC is an abbreviation for system development life cycle and it can be defined as a strategic methodology that defines the key steps, phases, or stages for the design, development and implementation of high quality systems.

In Computer technology, there are seven (7) phases involved in the development of a system and these include the following;

  • Planning
  • Analysis
  • Design
  • Development (coding)
  • Testing
  • Deployment
  • Maintenance

Also, phased implementation simply refers to an implementation methodology in which smaller portions of functionality of a system are typically implemented one at a time (one after the other).

In conclusion, we can infer and logically deduce that you would acquire all the necessary hardware and software during the <u>design</u> phase of system development.

Read more on phases here: brainly.com/question/7112675

#SPJ1

3 0
1 year ago
Anyone wanna join my giggl?
Leni [432]

Answer:

whats a giggl

Explanation:

7 0
2 years ago
Read 2 more answers
The LList class is (mostly) the same one discussed in lecture, but you must write a sort() function that uses one of the three i
Vladimir79 [104]

Answer:

see explaination

Explanation:

#include <iostream>

#include <string>

using namespace std;

class LinkedList{

class Node{

public :

int data;

Node* next;

Node(int data){

this->data = data;

next = NULL;

}

};

public :

Node *head;

LinkedList(){

this->head = NULL;

}

void insert(int d){

Node* new_node = new Node(d);

new_node->next = head;

head = new_node;

}

// sort the list with selection sort algorithm.

// Pick the smallest element in the unsorted array and place in the first element in the unsorted.

void sort_list(){

if (head == NULL){

return;

}

Node* current = head;

while (current->next != NULL){

Node* min_node = current;

Node* traverse = current->next;

while(traverse != NULL){

if(traverse->data < min_node->data){

min_node = traverse;

}

traverse = traverse->next;

}

int temp = current->data;

current->data = min_node->data;

min_node->data = temp;

current = current->next;

}

}

void print_list(){

Node* current = head;

while(current !=NULL){

cout<<current->data<<" ";

current = current->next;

}

cout<<"\n";

}

};

int main(){

LinkedList ll;

for(int i=0;i<10;i++){

ll.insert(i);

}

ll.print_list();

cout<<"*******************************************\n";

ll.sort_list();

ll.print_list();

cout<<"*******************************************\n";

}

8 0
3 years ago
Other questions:
  • Select the correct answer.
    8·2 answers
  • A food web is shown below. In this food web, energy is transferred directly from the to the
    11·1 answer
  • How many license plates are there if a license plate contains 3 letters from the 26 available in the English alphabet followed b
    15·1 answer
  • What does Pentium means?:/
    7·2 answers
  • Write a statement that compares the values of score1 and score2 and takes the following actions. When score1 exceeds score2, the
    7·1 answer
  • Gary has to complete a form before enrolling into an online course. A few of the fields require Gary to respond with either a "Y
    7·2 answers
  • technology might not possess emotional intelligence but it can certainly influence ours. how have technological changes affected
    7·1 answer
  • Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te
    13·1 answer
  • How many passes will it take to find the four in this list? 4, 5, 6, 7, 8, 9, 10 1 2 3 4
    12·2 answers
  • The process of arranging the item of a column in some sequence or order is known as?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!