Program to convert Military Time in Standard

A program that convert Military Time into Standar Time
military time converter

using namespace std;
#include<iostream>
#include<conio.h>
int main()
{

    int min,hours,x,y;
cout<<"Enter hours and minutes according to military time:";
cin>>x>>y;

if(x<12)
   hours=x;
else
   hours=x-12;
min=y;

cout<<"Standard Time:";
cout<<hours<<":"<<min;
                     
getch();      
return 0;

}

military time clock        24 hour clock


Program to convert Military Time in Standard Program to convert Military Time in Standard Reviewed by Shoaib Jameel on 3/08/2017 06:03:00 pm Rating: 5

No comments:

Ad

Propellerads
Theme images by mariusFM77. Powered by Blogger.