Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- struct time
- {
- int id;
- char name[100];
- float hour,minute;
- };
- int main ()
- {
- struct time st[100];
- int i,n,totalminute,hour,minute;
- scanf("%d",&n);
- for(i=0; i<n; i++)
- {
- printf("Enter the student id :");
- scanf("%d",&st[i].id);
- printf("Enter the student Name :");
- scanf("%s",&st[i].name);
- printf("Enter total hour & total minutes :");
- scanf("%f%f",&st[i].hour,&st[i].minute);
- }
- totalminute= ((hour*60)+minute);
- for(i=0; i<n; i++)
- {
- if (totalminute==240)
- {
- printf("\nshovaii k treat dete hobe:\n");
- }
- if(totalminute>240)
- {
- printf("\nshovaii k treat dete hobe:\n");
- }
- else
- {
- printf(" treat dete hobe NA\n:");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement