Search found 1 match

by opsori
Mon Sep 16, 2013 10:57 pm
Forum: Volume 116 (11600-11699)
Topic: 11677 - Alarm Clock
Replies: 18
Views: 4619

P-11677what's wrong with my code. i got submissionErr

#include<stdio.h> int main() { long int i,h1,m1,h2,m2,H,M,time; for(i=1;;i++) { scanf("%ld %ld %ld %ld",&h1,&m1,&h2,&m2); if(h1==0) { h1=24; } if(h2==0) { h2=24; } if(h1<h2&&m1<=m2) { H=h2-h1; M=m2-m1; time=H*60+M; printf("%ld\n",time); } if(h1<h2&&m2<m1) { H=(h2-(h1+1)); M=m2+60-m1; time=H*60+M; pr...

Go to advanced search