Sunday, 3 February 2013

Write a Program to Get Information of Employees in Cplusplus

programming in c, Data structure
Source Code:
#include <iostream>
using namespace std;
struct employ
{
            int employ_no;
            char designation[50];
            int salary;
};
void main()
{
            employ em;
            cout<<"Enter the Employ No: \t";
            cin>>em.employ_no;
            cout<<"Enter the Designation: \t";
            cin>>em.designation;
            cout<<"Enter the Salary: \t";
            cin>>em.salary;
            cout<<endl<<endl<<endl;
            cout<<em.employ_no<<endl;
            cout<<em.designation<<endl;
            cout<<em.salary<<endl;
}

Output:

 




Subscribe to get the latest right to your inbox:

0 comments:

Post a Comment

Some HTML Code