You are viewing a single comment's thread. Return to all comments →
string timeConversion(string s) { if(s[8] == 'A') { if(s[0] == '1' && s[1] == '2') { s[0] = '0'; s[1] = '0'; } } else if(s[8] == 'P') { if(s[0] != '1' || s[1] != '2') { s[0] = ((((((s[0] - '0') * 10) + (s[1] - '0')) + 12) / 10) + '0'); s[1] = ((((((s[0] - '0') * 10) + (s[1] - '0')) + 12) % 10) + '0'); } } s.erase(8, 2); return s; }
Seems like cookies are disabled on this browser, please enable them to open this website
Time Conversion
You are viewing a single comment's thread. Return to all comments →