#include typedef struct jikan { int ji; int fun; int byou; }jfb; jfb eltime(jfb a, jfb b) { jfb c; int hour, min, sec; hour=b.ji-a.ji;min=b.fun-a.fun;sec=b.byou-a.byou; if(sec<0) sec+=60; min-=1; if(min<0) min+=60; hour-=1; c.ji=hour;c.fun=min;c.byou=sec; return c; } jfb read(void) { int h, m, s; jfb t; scanf("%d %d %d", &h, &m, &s); t.ji=h;t.fun=m;t.byou=s; return t;} void write(jfb t){ printf("%d hour(s) %d minute(s) %d second(s).\n", t.ji, t.fun, t.byou); } int main() { jfb a,b,c; printf("Input start time.\n"); a=read(); printf("Input end time.\n"); b=read(); c=eltime(a,b); printf("Elapsed time is\n"); write(c); }