Answer to Question #22267 in C++ for patrick
i need a c++ program that lets you input a time and outputs the different time from the different time zones, UTC -12 up to UTC +12
1
2013-01-23T08:54:47-0500
#include <iostream>
using namespace std;
int i, h, m;
void main(){
cout<<"enter the hours: ";
cin>>h;
cout<<"enter the minutes: ";
cin>>m;
for (i = -12; i< 13; i++)
cout<<"UTC "<<i<<": "<<(h+i)%24<<":"<<m<<"\n";
system("pause");
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++
Comments
Leave a comment