Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tornikegomareli/88192c39c370f5836893cbc7f2f11716 to your computer and use it in GitHub Desktop.
Save tornikegomareli/88192c39c370f5836893cbc7f2f11716 to your computer and use it in GitHub Desktop.
C++ New students, currency application
#include <iostream>
using namespace std;
int main()
{
double GelCurrency = 2.61;
double EuroCurrency = 0.86;
double PoundCurrency = 0.77;
int USD = 0;
char GEL = 'L';
char Euro = 'E';
char Pound = 'P';
char result;
cout << " Hello to Curency Software " << endl;
cout << " Please enter your usd amount " << endl;
cout << " Your amount : ";
cin >> USD;
cout << " Please choose transfer currency " << endl;
cout << " To GEL - L" << endl;
cout << " To Euro - E" << endl;
cout << " To Pound - P" << endl;
cout << " Enter your choice :";
cin >> result;
if (result == Euro)
{
double current = USD * EuroCurrency;
cout << " Trasnferred money into euro " << endl;
cout << " Result : " << current << endl;
}
else if (result == GEL)
{
double current = USD * GelCurrency;
cout << " Trasnferred money into GEL " << endl;
cout << " Result : " << current << endl;
}
else if (result == Pound)
{
double current = USD * PoundCurrency;
cout << " Trasnferred money into Pound " << endl;
cout << " Result : " << current << endl;
}
cin.get();
cin.get();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment