Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Program is to define a class as employee:
Write a program to define a class as employee and collect information about them by using classes and object
class employee
{
private:
char name[20];
int empno;
float basic,hra,da;
float netpay;
float calculate()
netpay=basic+hra+da;
return netpay;
}
public:
void readdata();
void dispdata();
};
void employee::readdata()
clrscr();
cout<<" enter your name "<<"\n";
gets(name);
cout<<" enter the empoyee number "<<"\n";
cin>>empno;
cout<<" enter the basic salary "<<"\n";
cin>>basic;
cout<<" enter the house rent allowance "<<"\n";
cin>>hra;
cout<<" enter the dearance allowance"<<"\n";
cin>>da;
void employee::dispdata()
cout<<" the name is :"< cout<<" the employee number is :"< calculate(); cout<<" the salary you get is : "< } void main() { clrscr(); employee info; info.readdata(); info.dispdata(); }
cout<<" the employee number is :"< calculate(); cout<<" the salary you get is : "< } void main() { clrscr(); employee info; info.readdata(); info.dispdata(); }
calculate();
cout<<" the salary you get is : "< } void main() { clrscr(); employee info; info.readdata(); info.dispdata(); }
void main()
employee info;
info.readdata();
info.dispdata();
How do you declare an integer variable? Explain with an example.
(Random Numbers) Write statements that assign random integers to the variable n in the following ranges: a) 1 ≤ n ≤2 b) 1 ≤ n ≤100 c) 0 ≤ n ≤9 d) 1000 ≤ n ≤1112 e)
Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec
Write a program that does the following: Calculates the Velocity and Momentum of an object. The formula for the velocity is V=d/t and the formula Momentum is m=mass*velocity. Your
Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send
padovan string
can we use const data member in static. member function with example.
wap to calculatethe volume of cone,cylinderand sphere
WAP TO PRINT THE LARGEST NUMBER FROM ANY 10 NUMBERS #include stdio.h> #include conio.h> void main() { int a[10],i,max;
how to fill the blank space in4*4 matrix?
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd