Hack Forums
[C] c++ currency converter help - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] c++ currency converter help (/showthread.php?tid=5745666)



c++ currency converter help - Mymann - Oct 31, 2017

Are these hard to make? I'm willing to pay someone who can do this for me


RE: c++ currency converter help - d4rkj4y - Oct 31, 2017

What currencies are you trying to convert? Cryptos?


RE: c++ currency converter help - Mymann - Nov 1, 2017

No, just literally gbp to usd and euro to usd and stuff like that


RE: c++ currency converter help - ahemokay - Nov 2, 2017

Why would you pay someone for that lol its a job of 2 minutes.


RE: c++ currency converter help - Aus10 - Nov 8, 2017

Code
//This is a currency conversion program

    #include<iostream>

    using namespace std;



    int main()

    {

        char choice;

        double USD, Euro,JPY,GBP,SW,MX;//Contains US dollar value for(;;)/>

        {

            do

            {

                cout<<"Foreign currency exchange rate\n";

                cout<<"Choose a foreign currency\n";

                cout<<"and get results\n";

                cout<<"1. Euro\n";

                cout<<"2. Japanese Yen\n";//JPY

                cout<<"3. British Pound\n";//GBP

                cout<<"4. SWITZERLAND franc\n";//SW

                cout<<"5. Peso\n";//MX

                cout<<"Press q to quit(one time at first, a second time after amount shows)...\n";

                cin>>choice;

                cout<<"Enter US dollar amount\n";

                cin>>USD;

            }while(choice < '1' || choice > '5' && choice !='q');

            if(choice == 'q')
            {
                return 0;
            }

            cout<<"\n\n";



            switch(choice)

            {



            case '1':

                Euro = USD * 0.7563;//Conversion factor for Euro

                cout<<"$ "<<USD<<" is equal to "<<Euro<<" Euros\n";

                break;

            case'2':

                JPY = USD * 85.815;//Conversion factor for Japanese yen

                cout<<"$ "<<USD<<" is equal to "<<JPY<<" Yen\n";

                break;

            case'3':

                GBP= USD *   0.6277;//Conversion factor for British pound

                cout<<"$ "<<USD<<" is equal to "<<GBP<<" Pounds\n";

                break;

            case'4':

                SW= USD * 1.0588;//Conversion factor for francs

                cout<<"$ "<<USD<<" is equal to "<<SW<<" Switzerland Francs\n";

                break;

            case'5':

                MX= USD * 12.936;//Conversion factor for Peso

                cout<<"$ "<<USD<<" is equal to "<<MX<<" Pesos\n";

                break;

            }

            cout<<"\n";

        }

        return 0;

    }
No need to pay. Very simple program.
Just update the currency values to current values and you are  all set. =-)


RE: c++ currency converter help - ahemokay - Nov 8, 2017

(Nov 8, 2017 09:32 AM)Aus10 Wrote:  
Code
//This is a currency conversion program

    #include<iostream>

    using namespace std;



    int main()

    {

        char choice;

        double USD, Euro,JPY,GBP,SW,MX;//Contains US dollar value for(;;)/>

        {

            do

            {

                cout<<"Foreign currency exchange rate\n";

                cout<<"Choose a foreign currency\n";

                cout<<"and get results\n";

                cout<<"1. Euro\n";

                cout<<"2. Japanese Yen\n";//JPY

                cout<<"3. British Pound\n";//GBP

                cout<<"4. SWITZERLAND franc\n";//SW

                cout<<"5. Peso\n";//MX

                cout<<"Press q to quit(one time at first, a second time after amount shows)...\n";

                cin>>choice;

                cout<<"Enter US dollar amount\n";

                cin>>USD;

            }while(choice < '1' || choice > '5' && choice !='q');

            if(choice == 'q')
            {
                return 0;
            }

            cout<<"\n\n";



            switch(choice)

            {



            case '1':

                Euro = USD * 0.7563;//Conversion factor for Euro

                cout<<"$ "<<USD<<" is equal to "<<Euro<<" Euros\n";

                break;

            case'2':

                JPY = USD * 85.815;//Conversion factor for Japanese yen

                cout<<"$ "<<USD<<" is equal to "<<JPY<<" Yen\n";

                break;

            case'3':

                GBP= USD *   0.6277;//Conversion factor for British pound

                cout<<"$ "<<USD<<" is equal to "<<GBP<<" Pounds\n";

                break;

            case'4':

                SW= USD * 1.0588;//Conversion factor for francs

                cout<<"$ "<<USD<<" is equal to "<<SW<<" Switzerland Francs\n";

                break;

            case'5':

                MX= USD * 12.936;//Conversion factor for Peso

                cout<<"$ "<<USD<<" is equal to "<<MX<<" Pesos\n";

                break;

            }

            cout<<"\n";

        }

        return 0;

    }
No need to pay. Very simple program.
Just update the currency values to current values and you are  all set. =-)
This is totally wrong and a really bad example.