공부/짜잘한 알고리즘 문제
-
시간 차 구하기공부/짜잘한 알고리즘 문제 2019. 6. 21. 12:56
#include #include using namespace std; int main() { char *temp=NULL; int h = 0, m = 0, s = 0; char time1[100], time2[100]; int gap = 0, t1 = 0, t2 = 0, rh = 0, rm = 0, rs = 0; char ch[10], cm[10], cs[10]; cin.getline(time1, 100); strtok_s(time1, " ",&temp); h = atoi(strtok_s(temp, ":", &temp)); m = atoi(strtok_s(temp, ":", &temp)); s = atoi(strtok_s(temp, ":", &temp)); t1 = h * 3600 + m * 60 + s..