Created
October 1, 2018 16:13
-
-
Save tornikegomareli/88192c39c370f5836893cbc7f2f11716 to your computer and use it in GitHub Desktop.
C++ New students, currency application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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