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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
|
//SOURCE CODE PART 1
#include<iostream>
#include<conio.h>
#include<ctime>
#include<string.h>
#include<cstring>
using namespace std;
int Time[8] = { 8,9,10,11,12,2,3,4 };
string Day[6] = { "Monday","Tuesday","Wednesday","Thursday","Friday","Saturday" };
string Monday[8] = { "Physics","Chemistry","Maths","English","Programming","French","ECA","Reference" };
string Tuesday[8] = { "English","Maths","Chemistry","Physics","Reference","French","ECA","Programming" };
string Wednesday[8] = { "Physics","ECA","Maths","English","Programming","French","Chemistry","Reference" };
string Thursday[8] = { "Chemistry","Physics","Maths","English","Programming","Reference","ECA","French" };
string Friday[8] = { "Reference","Chemistry","Maths","English","Programming","French","ECA","Physics" };
string Saturday[8] = { "Physics","Programming","Maths","English","Chemistry","French","ECA","Reference" };
int time(int var1);
int main()
{
int var1;
int var2;
int var3;
cout << "Enter the Time" << endl;
cin >> var1;
char day[15];
if (var1 == Time[0])
{
cout << "Enter the day";
cin>>day;
var2 = strlen(day);
if(strlen(day)==6)
{
if(day[1]=='o'){
cout<<Monday[0]<<endl;;
cout<<Monday[1];
}
else
{
cout<<Friday[0]<<endl;
cout<<Friday[1];
}
}
if(strlen(day)==7)
{
cout<<Tuesday[0]<<endl;;
cout<<Tuesday[1];
}
if(strlen(day)==9)
{
cout<<Wednesday[0]<<endl;;
cout<<Wednesday[1];
}
if(strlen(day)==8)
{
if(day[1]=='h'){
cout<<Thursday[0]<<endl;;
cout<<Thursday[1];
}
else
{
cout<<Saturday[0]<<endl;
cout<<Saturday[1];
}
}
}
if (var1 == Time[1])
{
cout << "Enter the day";
cin>>day;
var2 = strlen(day);
if(strlen(day)==6)
{
if(day[1]=='o'){
cout<<Monday[1]<<endl;;
cout<<Monday[2];
}
else
{
cout<<Friday[1]<<endl;
cout<<Friday[2];
}
}
if(strlen(day)==7)
{
cout<<Tuesday[1]<<endl;;
cout<<Tuesday[2];
}
if(strlen(day)==9)
{
cout<<Wednesday[1]<<endl;;
cout<<Wednesday[2];
}
if(strlen(day)==8)
{
if(day[1]=='h'){
cout<<Thursday[1]<<endl;;
cout<<Thursday[2];
}
else
{
cout<<Saturday[1]<<endl;
cout<<Saturday[2];
}
}
}
|