100% struct time of start and end of observation of a chemical reaction


#include<stdio.h>
#include<conio.h>
struct timer
{
 int hr,min,s;
}t1,t2;
void main()
{
  clrscr();
  printf("\n  enter hours, minutes, seconds at which the observation of  chemical reaction started:  ");
  scanf("%d%d%d",&t1.hr,&t1.min,&t1.s);
   printf("\n  enter hours, minutes, seconds at which the observation of chemical reaction concluded: ");
  scanf("%d%d%d",&t2.hr,&t2.min,&t2.s);
  printf("\n\n   initial time=%2d:%2d:%2d",t1.hr,t1.min,t1.s);
  printf("\n   concluded time=%2d:%2d:%2d",t2.hr,t2.min,t2.s);
  getch();

}
తెరమీద 

enter hours, minutes, seconds at which the observation of  chemical reaction started:11 12 15
enter hours, minutes, seconds at which the observation of chemical reaction concluded:11 13 21
the recorded data is:
 initial time= 11:12:15
 concluded time= 11:13:21

కామెంట్‌లు

ఈ బ్లాగ్ నుండి ప్రసిద్ధ పోస్ట్‌లు

100% C prog to write content into a file and then read it back onto the console

Spic macay

శ్రీరస్తు.. రామలింగ 18-1-24 (సూరసాని వారి ఆహ్వానము)