Uri 1047

Source Code:


#include <stdio.h>
int main()
{
int st, sm, et, em, rm, rt;
scanf(“%d %d %d %d”,&st,&sm,&et,&em);
rt=et-st;
if(rt < 0)
{
rt=24+(et – st);
}
rm=em-sm;
if(rm<0)
{
rm = 60 +(em – sm);
rt–;
}
if(et == st && em == sm)
{
printf(“O JOGO DUROU 24 HORA(S) E 0 MINUTO(S)\n” );
}
else printf( “O JOGO DUROU %d HORA(S) E %d MINUTO(S)\n” , rt, rm);
return 0;
}

Advertisements

About waprogramming

I am in CSE,from CUET
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s