Advertisement
RAJIBRAJU

,,

Jul 29th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.91 KB | None | 0 0
  1. #include<stdio.h>
  2. struct time
  3. {
  4.     int id;
  5.     char name[100];
  6.     int hour,minute;
  7.  
  8.  
  9. };
  10. int main ()
  11. {
  12.     struct time st[100];
  13.     int i,n;
  14.  
  15.     scanf("%d",&n);
  16.     for(i=0; i<n; i++)
  17.     {
  18.         printf("Enter the student id :");
  19.         scanf("%d",&st[i].id);
  20.         printf("Enter the student Name :");
  21.         scanf("%s",&st[i].name);
  22.         printf("Enter total hour :");
  23.         scanf("%d",&st[i].hour);
  24.           printf("Enter  total minutes :");
  25.         scanf("%d",&st[i].minute);
  26.        ((st[i].hour*60)+st[i].minute);
  27.        if ( ((st[i].hour*60)+st[i].minute)==240)
  28.         {
  29.             printf("\nshovaii k treat dete hobe:\n");
  30.         }
  31.         else if( ((st[i].hour*60)+st[i].minute)>240)
  32.         {
  33.             printf("shovaii k treat dete hobe:\n");
  34.  
  35.         }
  36.         else
  37.         {
  38.             printf(" treat dete hobe NA\n:");
  39.  
  40.         }
  41.  
  42.     }
  43.  
  44.  
  45.  
  46.  
  47.     return 0;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement