Igor lives in Russia and frequently travel to Singapore (time difference: + 6 hours), western Canada (time difference: -10 hours) and India (time difference: + 3.5 hours). Write an algorithm, in the form of a flowchart, which inputs the present time (using 24 hour clock) and the country he is visiting. The output will be the time in the country he is visiting.
#include <iostream>
using namespace std;
int main()
{
int time;
cin >> time;
cout << "Singapore: " << time + 6 << '\n'
<< "Canada: " << time - 10 << '\n'
<< "India: " << time +3.5 << '\n';
return 0;
}
Comments
Leave a comment