Advertisement
RAJIBRAJU

shawon vai

Jul 28th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.97 KB | None | 0 0
  1. #include<stdio.h>
  2. struct time
  3. {
  4.     int id;
  5.     char name[100];
  6.     int hour,minute;
  7.      float totalminute;
  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.  
  28.     }
  29.  
  30.  
  31.     for(i=0; i<n; i++)
  32.  
  33.     {
  34.         if ( ((st[i].hour*60)+st[i].minute)==240)
  35.         {
  36.             printf("\nshovaii k treat dete hobe:\n");
  37.         }
  38.         if( ((st[i].hour*60)+st[i].minute)>240)
  39.         {
  40.             printf("shovaii k treat dete hobe:\n");
  41.  
  42.         }
  43.         else
  44.         {
  45.             printf(" treat dete hobe NA\n:");
  46.  
  47.         }
  48.     }
  49.  
  50.     return 0;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement