CyberCodes
Currency Conversion in C++ Welcome

Reminders sa mga rehistradong myembro:

•ang lengwahe na gagamitin ay pawang english at tagalog lamang

•Bawal po dito ang pakikipag away

•Bawal ang mga shorcut na mga words
Example: txt, Pwd, at iba pa

•Bawal mababastos at masasakit na salita o anu mang makakasakit
ng damdamin ng isang myembro ng forum na ito

•use the "like" button if the post of the following user you think are usefull



Join the forum, it's quick and easy

CyberCodes
Currency Conversion in C++ Welcome

Reminders sa mga rehistradong myembro:

•ang lengwahe na gagamitin ay pawang english at tagalog lamang

•Bawal po dito ang pakikipag away

•Bawal ang mga shorcut na mga words
Example: txt, Pwd, at iba pa

•Bawal mababastos at masasakit na salita o anu mang makakasakit
ng damdamin ng isang myembro ng forum na ito

•use the "like" button if the post of the following user you think are usefull

CyberCodes
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Currency Conversion in C++

Go down

Currency Conversion in C++ Empty Currency Conversion in C++

Post by princeterror Thu Jan 10, 2013 7:21 am

Question: Currency traders wants a program that converts american dollars to British pounds, Philippine Pesos and Japanese yen and then Display the result. Use the the following conversion rates for 1 american dollar: 0.571505 British pounds, 40.7956 Philippine pesos and 112.212 Japanese yen. save it as "arithmetic3.cpp".

Output:

Enter the amount in american dollars: ___________

"____________ American Dollars is equal to _____________ pounds."
"____________ American Dollars is equal to _____________ pesos."
"____________ American Dollars is equal to _____________ yen"

Answer codes:
Code:
# include <iostream>

using namespace std;

int main()
{
    double a,b=0.571505,c=40.7956,d=112.212;
    cout<<"Enter the amount in american dollars: ";
    cin>>a;
    cout<<endl<<endl;



    cout<<a<<" American Dollar(s) is equal to "<<a*b<<" pounds."<<endl;
    cout<<a<<" American Dollar(s) is equal to "<<a*c<<" pesos."<<endl;
    cout<<a<<" American Dollar(s) is equal to "<<a*d<<" yen."<<endl;

    //system("pause");
    return 0;
}
princeterror
princeterror
Universal Moderator
Universal Moderator

Posts : 272
Credits : 11465
Fame : 81
Join date : 2012-06-07
Age : 32

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum