employee database using structure in c
#include<stdio.h>
#include<conio.h>
struct employee
{
char name[30];
float salary;
}
main()
{
int i;
struct employee e[5];
for(i=0;i<5;i++)
{
printf("\nEnter Name:\t");
scanf("%s",e[i].name);
printf("Enter Salary:\t");
scanf("%f",&e[i].salary);
}
printf("\nName and Salary of employees are:");
for(i=0;i<5;i++)
{
printf("\nName=%s\tSalary=%f",e[i].name,e[i].salary);
}
}