The document describes a currency converter program code that allows the user to enter Indian rupees and select a currency to convert it to, including US dollar, Japanese yen, Pakistani rupee, British pound, and Mexican peso. The program code is explained and sample output is shown.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
19 views6 pages
OOP Microproject
The document describes a currency converter program code that allows the user to enter Indian rupees and select a currency to convert it to, including US dollar, Japanese yen, Pakistani rupee, British pound, and Mexican peso. The program code is explained and sample output is shown.
No. No. 1. CODE OF CURRENCY CONVERTER 3. 2. OUTPUT OF PROGRAM 6. CODE OF CURRANCY CONVERTER:- #include<iostream.h> #include<conio.h> class CONVERTER { public: float rupees; void getdata() { cout<<"ENTER INDIAN RUPEES :"; cin>>rupees; } }; class choice:public CONVERTER { public: int choice; float ad,jy,pr,bp,mp; void getdata1() { cout<<"\n1.AMERICAN DOLLAR\n2.JAPANESE YEN\n3.PAKISTANI RUPEES\n4.BRITISH POUND\n5.MEXICON PESOS\n**ENTER YOUR CHOICE:"; cin>>choice; } void display() { switch(choice) { case 1: ad=rupees/79; cout<<"\nVALUE IN AMERICAN DOLLAR IS :"<<ad; break; case 2: jy=rupees/1.70; cout<<"VALUE IN JAPANESE YEN IS :"<<jy; break; case 3: pr=rupees/2.47; cout<<"VALUE IN PAKISTAN RUPEES IS:"<<pr; break; case 4: bp=rupees/0.010; cout<<"VALUE IN BRITISH POUND IS :"<<bp; break; case 5: mp=rupees/0.24; cout<<"VALUE IN MEXICAN PESO IS :"<<mp; break; default: cout<<"Invalid Choice You Entered"; } } }; void main() { clrscr(); Choice C1; C1.getdata(); C1.getdata1(); C1.display(); getch(); } OUTPUT OF PROGRAM:-