Answers for "employee database using structure in c"

C
0

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);
}

}
Posted by: Guest on July-30-2021

Code answers related to "employee database using structure in c"

Code answers related to "C"

Browse Popular Code Answers by Language