daily pastebin goal
22%
SHARE
TWEET

3rd semester1

Susri Jan 18th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. struct employee {
  3.     char name[30];
  4.     int id;
  5.     float salary;
  6.  
  7. };
  8. int main(void)
  9. {
  10.     struct employee em[5];
  11.     int i;
  12.     for(i=0;i<5;i++)
  13.     {
  14.         printf("Information of employee : %d \n",i+1);
  15.         fflush(stdin);
  16.         gets(em[i].name);
  17.         scanf("%d",&em[i].id);
  18.         scanf("%f",&em[i].salary);
  19.     }
  20.     for(i=0;i<5;i++)
  21.  
  22.  
  23.     {
  24. printf("Name: %s\n",em[i].name);
  25.  
  26.         printf("Id number: %d\n",em[i].id);
  27.         printf("Salary: %.2f\n",em[i].salary);
  28.     }
  29.     return 0;
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top