Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C by jamestounde ( 13 years ago )
#include<stdio.h>//*programme commencé a la cafétaria et fini o cours de progra with chrichri and gaitan*//:
#include<conio.h>
main()
{int h1,i,m1,h2,m2,dm,sh=0,sm=0;//*h1/h2=heure debut/fin;m1/m2=minute debut/fin;dm=difference min;sh=somme heure;sm=sommme minute*//
for(i=1;i<=5;i++)
{printf("JOUR %d\n",i);
printf("------\n");
printf("DE:");
scanf("%dh%d",&h1;,&m1;);
printf("A :");
scanf("%dh%d",&h2;,&m2;);
dm=m2-m1;
if(dm<0)
{printf("duree de %dhd\n\n",(h2-h1-1),60+dm);
}
else if((dm>0)|| (dm==0))
{
printf("duree de %dhd\n\n",h2-h1,m2-m1);
}
sh=sh+(h2-h1);
sm=sm+(m2-m1);
}
printf("\n\nTOTAL:%dhd",sh,sm);
printf("\n\n\n projet by jamestounde\n");
printf("\nTHANKS GOD");
getch();
}
Revise this Paste