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