    01: #include <iostream>
    02:
    03: #include <string>
    04:
    05: using namespace std;
    06:
    07: int main()
    08: {
    09:    cout << "Enter coin name: ";
    10:    string name;
    11:    cin >> name;
    12:    double value = 0;
    13:
    14:    if (name == "penny")
    15:       value = 0.01;
    16:    else if (name == "nickel")
    17:       value = 0.05;
    18:    else if (name == "dime")
    19:       value = 0.10;
    20:    else if (name == "quarter")
    21:       value = 0.25;
    22:    else
    23:       cout << name << " is not a valid coin name\n";
    24:    cout << "Value = " << value << "\n";
    25:
    26:    return 0;
    27: }