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
OLEGan [10]
3 years ago
7

g c 24-hour time (also known in the U.S. as military time) is widely used around the world. Time is expressed as hours since mid

night. The day starts at 00:00, and ends at 23:59. Write a program that converts am/pm time to 24-hour time. The input is two numbers and a string. If the input is 2 30 pm, the output should be 14:30. If the input is 12 01 am, the output should be 00:01. Hints: Think of how each hour should be handled. 12 00 am -12 59 am becomes what
Computers and Technology
1 answer:
SpyIntel [72]3 years ago
5 0

Answer:

see explaination

Explanation:

#include<string>

using namespace std;

int main(){

int hr, min; string meridian;

int m_hr, m_min;

do{

cout<<"Enter hour [0-12]: "; cin >> hr;

}while(hr<1 || hr>12);

do{

cout<<"Enter minutes [0-59]: "; cin >> min;

}while(min<0 || min>59);

do{

cout<<"Enter am or pm: "; cin >> meridian;

}while(meridian.compare("am")!=0 && meridian.compare("pm")!=0);

int abs_time = 0;

if(meridian.compare("am")==0){

abs_time = hr*60 + min;

if(hr==12){

abs_time -= hr*60;

}

}else{

abs_time = 12*60 + hr*60 + min;

}

m_hr = abs_time/60;

m_min = abs_time%60;

cout<<"Military Time: "<<(m_hr<10?"0":"")<<m_hr<<":"

<<(m_min<10?"0":"")<<m_min<<endl ;

}

You might be interested in
Which protocol that runs on cisco routers shares information between cisco devices?
just olya [345]
The CDP protocol runs on CISCO routers and shares information between CISCO devices. CDP stands for Cisco Discovery Protocol. It is a protocol on Layer 2 (Data -Link layer) of the OSI model that enables CISCO devices to share information between them. The information includes for example the <span>operating system version and IP address.</span>
6 0
3 years ago
What technology has seen the largest increase in venture funding for products and services related to well-being and care delive
Karo-lina-s [1.5K]

The technology has seen the largest increase in venture funding for products and services related to well-being and care delivery is Tech startups.

<h3>Why do venture capitalists invest in the use of technology?</h3>

Venture capital funds are known to be firms or people that are said to often invest in things or tech that can bring a lot of  substantial returns on any of their invested capital.

Due to the above, Tech startups are known to have a special characteristics that make them a good  technology investment for venture capitalists.

Learn more about technology from

brainly.com/question/25110079

#SPJ1

5 0
2 years ago
You have decided to use a worksheet to keep track of your monthly income and expenses. What categories might your worksheet incl
Wewaii [24]

The steps to set up your own budget include:

<span>1= Create a new Excel worksheet2= Determine your income3= Determine your fixed expenses4= Determine your variable expenses5= Make provision for funds you may need6= Create your financial goals7= Ideas on how to kick start your emergency fund8= Analyze your budget9= Track your expenses</span>
6 0
3 years ago
Bruno took the computer that he uses at work, and Pauline sits on the beach with her laptop computer, which she connects to the
Anika [276]

Answer:

Mobile Hotspot

Explanation:

using Mobile Hotspot you can connect to the internet using mobile data.

For this to work you should turn off the Wi-Fi in your mobile if any. We can connect more than one device using mobile hotspot

4 0
3 years ago
Reliability requirements define the extent to which defects will be detected by users during abnormal operation.
Neko [114]

Answer: False

Explanation:

 The given statement is false, as the reliability requirement is the prediction that whether the product fail or not under the specific condition.

The reliability requirement is the part of the technical specification report. Reliability is the specific property that indicate repeatability in different kinds of experimental conditions.

It basically indicate the requirements that the company set its own product and engineers and prepare the reliability document for the customers.

8 0
3 years ago
Other questions:
  • Sharon is a network engineer for your firm and is investigating the WAN connection into the hot site. In the event of operations
    13·1 answer
  • You would like the user of a program to enter a customer’s last name. Write a statement thaUse the variables k, d, and s so that
    5·1 answer
  • Match the items with their respective descriptions.
    6·2 answers
  • it has been said that television has little real educational value. what is your opinion on this issue?
    11·1 answer
  • 10. A loop statement is given as:
    7·1 answer
  • Which of the following is not a characteristic of a good value log entry
    15·1 answer
  • Full form of DVX please answer fast ​
    9·1 answer
  • Twenty years ago, most games were sold in brick and mortar stores. How did independent game developers get their games into thes
    12·1 answer
  • What uses HTML hypertext links that users can click to access different locations or information?
    9·1 answer
  • A __________ is a sequence of characters.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!