UVA 11677 - Alarm Clock UVA • Sep 1, 2020 Problem PDFSolution:#include int main() { int a,b,c,d; while(scanf("%d%d%d%d",&a,&b,&c,&d)==4 && (a<24) && (b<60) && (c<24) && (d<60)) { if(a==0&&b==0&&c==0&&d==0) break; else { a=c-a; b=d-b; if(b<0) { b=b+60; a=a-1; } if(a<0) a=a+24; a=a*60+b; } printf("%d\n",a); } return 0 ; } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/11677/11677.cpp Tags UVA Competitive Programming Shipu Ahamed Recommended for you UVA UVA 913 - Joana and the Odd Numbers 4 years ago • 1 min read UVA UVA 871 - Counting Cells in a Blob 4 years ago • 3 min read UVA UVA 866 - Intersecting Line Segments 4 years ago • 3 min read