Ex:
class invoice
{
private:
int rate,qty,amt;
public:
void in();
{
cout<<"Enter rate and qty: ";
cin>>rate>>qty;
}
void out();
{
amt=rate*qty;
cout<<endl<<rate<<qty<<amt;
}
};
void main()
{
class invoice b;
int ch;
clrscr();
cout<<"Enter any Choice: ";
cin>>ch;
switch(ch)
{
case 1: b.in();
break;
case 2:b.out();
break;
}
getch();
}
When run this program then enter your choice, if I enter 1 then input rate and qty, if I enter 2 then display rate,qty, and amt which i input.
1. This is in the wrong forum. It's a Programming matter, not a Security one. 2. I don't see a question here. What is your problem?
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |