rendered paste body/*
Lab Assignment #1
Due: October 27, 2011
Messri, Pedram
StudentID: 88-159-5802
CS575 - Introduction to C++
*/
#include <iostream>
#include <climits>
using namespace std;
#define GBP_USD 1.56366 // British Pound
#define CAD_USD 0.972763 // Canadian Dollar
#define DKK_USD 0.182804 // Danish Krone
#define EUR_USD 1.3607 // Euro
#define SEK_USD 0.149196 // Swedish Krona
#define CHF_USD 1.09911 // Swiss Franc
int main(int argc, char *argv[])
{
bool repeat = true;
int selected_currency;
float total_usd = 0.0;
cout << endl;
cout << "Currency Converter Program By Pedram Messri" << endl;
cout << "Enter the currency to convert:" << endl;
cout << "1 British Pound" << endl;
cout << "2 Canadian Dollar" << endl;
cout << "3 Danish Krone" << endl;
cout << "4 Euro" << endl;
cout << "5 Swedish Krona" << endl;
cout << "6 Swedish Franc" << endl;
cout << endl;
while(repeat)
{
cout << "Currency Selection: ";
cin >> selected_currency;
cin.ignore(numeric_limits<streamsize>::max(),'\n');
if(cin)
{
cout << "GOTHERE";
switch(repeat)
{
case 1:
break;
case 2:
break;
case 3:
break;
case 4:
break;
case 5:
break;
case 6:
break;
case -999:
repeat = false;
break;
default:
break;
}
}
else
{
cin.clear();
//cin.ignore(1000, '\n');
cin.ignore(numeric_limits<streamsize>::max(),'\n');
cout << "That is an invalid selection, please try again." << endl;
cout << "Please only select between 1 through 6, or -999 to terminate." << endl;
}
}
return 0;
}