1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
const int Day = 7;
const int Rate = 3;
int DayInput;
char SessionInput;
char M, A, N;
int Array[Rate][Day] = {
{0.50,0.50,0.50,0.50,0.50,0.75,0.75},
{0.75,0.75,0.75,0.75,0.75,1.00,1.00},
{1.00,1.00,1.00,1.00,1.00,1.25,1.25}
};
do{
cout << "Enter Day. (1 for Mon, 2 for Tue, 3 for Wed, 4 for Thurs, 5 for Fri, 6 for Sat, 7 for Sat)." << endl;
cin >> DayInput;
cin.clear();
cin.ignore(INT_MAX, '\n');
} while(DayInput < 1 || DayInput > 9);
do{
cout << "Enter Session. (M for Morning, A for Afternoon, N for Night)" << endl;
cin >> SessionInput;
cin.clear();
cin.ignore(INT_MAX, '\n');
} while(SessionInput != M || SessionInput != A ||SessionInput != N);
cout << "Validation passed." << endl;
system ("PAUSE");
return 0;
}
|