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 teacher:
Program is to define a class as teacher and collect information about them by using classes and object
class teacher
{
private:
char name[20];
char sub[10];
float basic,hra,da;
float salary;
int calculate()
salary=basic+hra+da;
return salary;
}
public:
void readdata();
void dispdata();
};
void teacher::readdata()
clrscr();
cout<<" enter your name "<<"\n";
gets(name);
cout<<" enter the subject you teach "<<"\n";
cin>>sub;
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 teacher::dispdata()
cout<<" the name is :"< cout<<" the subject you teach is :"< calculate(); cout<<" the salary you get is : "< } void main() { clrscr(); teacher info; info.readdata(); info.dispdata(); }
cout<<" the subject you teach is :"< calculate(); cout<<" the salary you get is : "< } void main() { clrscr(); teacher info; info.readdata(); info.dispdata(); }
calculate();
cout<<" the salary you get is : "< } void main() { clrscr(); teacher info; info.readdata(); info.dispdata(); }
void main()
teacher info;
info.readdata();
info.dispdata();
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
c program for boardcolouring
Program to Open a file in C++: int main() { char ch; ifstream f1 ("OLDFILE.TXT"); ofstream f2 ("NEWFILE.TXT");
Explain The Type Conversion in Expressions in c language? When variables and constants of different types are used in an expression they are all converted to same type. The com
#include stdio.h> #include conio.h> #include ctype.h> #include string.h> void main() { int i=0,j=0,length; char a[30]; cl
Write a program in C to implement a FTP client that can interoperate with a default FTP server . The client should implement basic FTP commands GET PUT LIST DELE . GET -> to
It is a class defined in the scope of a function _ any function, whether a member functions or a free function. For instance: // Example : Local class // int f() { c
Q: Name the operators which cannot be overloaded? A:sizeof, ., .*, .->, ::, ?:
First line starts with T, number of test cases. Each test case T contains a necklace (N).
write a program to calculate the cuboid
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: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd