#include <stdio.h> #include <string.h> #include <math.h> #define N 100 int main() { int d1, f1, m1; int d2, f2, m2; int sc, fc, mc; scanf("%d:%d:%d", &d1, &f1, &m1); scanf("%d:%d:%d", &d2, &f2, &m2); sc = abs(d2 - d1); fc = abs(f2 - f1); mc = abs(m2 - m1); printf("%d:%d:%d", sc, fc, mc); } |
Double click to view unformatted code.