Advertisement
RAJIBRAJU

correction

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