Program to illustrate Employee Info

#include <iostream.h>
struct employee
{
    char name[30];
    int code;
    int salary;
}emp[30];

main()
{
    int i;
    for(i=0;i<30;i++)
{
    cout<<"Enter the name of the employee\n";
    cin>>emp[i].name;
    cout<<"Entre the code of employee\n";
    cin>>emp[i].code;
    cout<<"Enter the salary\n";
    cin>>emp[i].salary;
}
    for(i=0;i<30;i++)
    {
        if(emp[i].salary>10000)
        {
        cout<< " Employee having salary > 10,000  : " <<emp[i].name ;
        }
    }
}

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|