Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions Employee .c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include<stdio.h>
struct Employee
{
char Name[20];
int Emp_id;
float Salary;
};
int main()
{
struct Employee emp[20];
int i,n;
printf("Enter the no. of Employee: ");
scanf("%d",&n);
for(i=0;i<n;i++)
{
printf("Enter full name: ");
scanf("%s",emp[i].Name);
printf("Enter employee id: ");
scanf("%d",&emp[i].Emp_id);
printf("Enter salary: ");
scanf("%f",&emp[i].Salary);
}
printf("Display Information\n");
for(i=0;i<n;i++)
{
printf("Name: %s\n",emp[i].Name);
printf("Employee Id:%d\n",emp[i].Emp_id);
printf("Salary: %.2f\n",emp[i].Salary);
}
return 0;
}