Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- struct employee
- {
- char name [30];
- int id;
- float salary;
- };
- int main()
- {
- struct employee employee[6];
- int i;
- for(i=0; i<6; i++)
- {
- printf("%d",i+1);
- gets(employee[i].name);
- scanf("%d",&employee[i].id);
- scanf("%f",&employee[i].salary);
- }
- for(i=0; i<6; i++)
- {
- printf("%d",i+1);
- printf("%s",employee[i].name);
- printf("%d",employee[i].id);
- printf("%f",employee[i].salary);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement