Advertisement
RAJIBRAJU

shawon vai er problem

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