WAP to take one structure name employee that contain empid, empname, and salary, get data for 5 employee and display in attractive format.

Defination:: WAP to take one structure  name employee that contain empid, empname, and salary, get data for 5 employee and display in attractive format.

Source Coide::

struct employee
{
    int id;
    char na[10];
    int sal;
}e[5];
void main()
{
    int i;
    clrscr();
    printf("enter empid,name,salery");

    for(i=0;i<=4;i++)
    {
        scanf("%d%s%d",&e[i].id,e[i].na,&e[i].sal);
        printf("\n");
    }

    for(i=0;i<=4;i++)
    {
        printf("\nempid:%d\nname:%s\nsalery%d",e[i].id,e[i].na,e[i].sal);
        printf("\n");
    }
    getch();
}
WAP to take one structure name employee that contain empid, empname, and salary, get data for 5 employee and display in attractive format. WAP to take one structure  name employee that contain empid, empname, and salary, get data for 5 employee and display in attractive format. Reviewed by Unknown on 21:27 Rating: 5

No comments:

Powered by Blogger.