Preview:
#include <iostream>
#include <string>
#include <math.h>
using namespace std;       //Ծրագիր, որը դոլարը, ֆունտը և եվրոն կդարձնի դրամ                                                  //1 եվրո = 542,10 դրամ
                           //1դոլար = 482,78 դրամ
                           //1 ֆունտ = 649,16 դրամ

int main() {
    const double x = 542.1, y = 482.78, z = 649.16;
    double gumar;
    string tesak;

    cout << "Barev dzez." << " " << "gumari chapy-";
    cin >> gumar;
    cout << "gumari tesaky-";
    cin >> tesak;
    if (tesak == "dolar") {
        cout << gumar << " " << "dolary hamarjeq e" << " " << gumar * y << " " << "drami";
    }
    else if (tesak == "evro") {
        cout << gumar << " " << "evron hamarjeq e" << " " << (ios::fixed | ios::showpoint) << gumar * x << " " << "drami";
    }
    else if (tesak == "funt") {
        cout << gumar << " " << "funty hamarjeq e" << " " << gumar * z << " " << "drami";
    }
    else {
        cout << "inch vor ban sxal e";
    }
    return 0;
}

                    
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter