Currency calculator

Hello,

So i am making calculator from euros to all kinds of currencies. But first i would like you if this is the right way or should i fix something?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>

using namespace std;

int main()

{

    //1 Euro = 1.3786 U.S. dollars
    //1 Euro = 141.047678 Japanese yen
    int chosenPROGRAM;
    int ETD=1,ETY=2;
    int euro;
    float Dollars=1.3786,YEN=141.047678;

    cout<<"Choose which currency calculator you want to pick(enter the chosen number):"<<endl;
    cout<<"1. Euro to Dollars"<<endl<<"2. Euro to Yen"<<endl;
    cin>>chosenPROGRAM;
    if(chosenPROGRAM == ETD) {
    cout<<"Write the number in euros to transfer it to dollars"<<endl;
    cin>>euro;
    cout<<euro<<"e in dollars is "<<euro*Dollars<<endl;
    }else if (chosenPROGRAM == ETY) {
    cout<<"Write the number in euros to transform it to YEN"<<endl;
    cin>>euro;
    cout<<euro<<"e in YEN is "<<euro*YEN<<endl;
    }

    cin.get();
    return 0;
}
Last edited on
Topic archived. No new replies allowed.