Currency converter

Hi this should be currency converter could you tell me what is wrong here? Thank you

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  #include <iostream>
using namespace std;
int main()
{

    int x;
    cin>>x;
    switch(x) {
    
    
        case 'D': int y; cin>>y; cout<<y*1.63;
            break;
        case 'E': int z; cin>>z; cout<<z*1.23;
            break;
        case 'S': int d; cin>>d; cout<<d*2.23;
            break;
        default:cout<<"error";
    
    
    }
    return 0;
}

Normally, when asking for user-input a cout should be used to indicate what type of input you are looking for and to let the user know you're actually looking for input. Also, you're trying to get a character (D, E, S) and store it in an integer. x being a char data type would fix this.
char x;
Could you explain the type of error your having? What exactly are you looking for help with?
Thank you!! I am new at this and I cannot quite get everything well!! I know now what to do! you've been very thankful! thanks again!
Topic archived. No new replies allowed.