//BCA Support
//www.bcasupport.xyz
#include <iostream.h>
#include <conio.h>
class rupees
{
float rupee;
public:
void getdata(int x)
{
rupee=x;
}
void show()
{
cout<<"\nRupees : "<<rupee;
}
float getrupee()
{
return rupee;
}
};
class paisa
{
double paise;
public:
paisa() {}
paisa(rupees r)
{
paise=(r.getrupee()*100);
}
void getdata(int x)
{
paise=x;
}
void show()
{
cout<<"\nPaise : "<<paise;
}
double getpaise()
{
return paise;
}
operator rupees()
{
rupees r;
r.getdata(paise/100);
return r;
}
};
int main()
{
clrscr();
paisa p;
rupees r;
cout<<"\nPaise to Rupees-";
p.getdata(1000);
p.show();
r=p;
r.show();
cout<<"\n\nRupees to Paise-";
r.getdata(100);
r.show();
p=r;
p.show();
getch();
return 0;
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.