Advertisement
rony-Rony_05

4

Aug 27th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.72 KB | None | 0 0
  1. #include<stdio.h>
  2. struct student
  3. {
  4.     char name[1000];
  5.     int account_number,Amount;
  6. };
  7. int main()
  8. {
  9.     struct student student[10];
  10.     int i;
  11.     for(i=0;i<10;i++)
  12.     {
  13.         printf("%d\n",i+1);
  14.  
  15.         fflush(stdin);
  16.         printf("Name:");
  17.         gets(student[i].name);
  18.         printf("Account name:");
  19.         scanf("%d",&student[i].account_number);
  20.         printf("Amount:");
  21.         scanf("%d",&student[i].Amount);
  22.     }
  23.     for(i=0;i<10;i++)
  24.     {
  25.         if(student[i].Amount>1000)
  26.         {
  27.             printf("%s\n",student[i].name);
  28.             printf("%d\n",student[i].account_number);
  29.             printf("%d\n",student[i].Amount);
  30.         }
  31.         printf("\n");
  32.    }
  33.    return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement