ANASRAZAL1F22BSCS0981

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

#include <iostream>

using namespace std;

int main()
{
int a;
do
{
cout << "Enter your selection: V print all, Enter your
selection: 1,2,3,4,5,6 to display days shudule seprately and
[1=Saturday, 2=Sunday, 3=Monday, 4=Tuesday, 5=Wednesday,
6=Thursday, 7=Friday]" << endl;
cin >> a;
if (a == 0)
{
cout << "Thanks for using this program" << endl;
}
else if (a == 1)
{
cout << "The shop opens at 9am and closes at 5pm
on Saturdays" << endl;
}
else if (a == 2)
{
cout << "The shop opens at 9am and closes at 1pm
on Sundays" << endl;
}
else if (a == 3)
{
cout << "The shop opens at 9am and closes at 6pm
on Mondays" << endl;
}
else if (a == 4)
{
cout << "The shop opens at 9am and closes at 6pm
on Tuesdays" << endl;
}
else if (a == 5)
{
cout << "The shop opens at 9am and closes at 8pm
on Wednesdays" << endl;
}
else if (a == 6)
{
cout << "The shop opens at 9am and closes at 6pm
on Thursdays" << endl;
}
else if (a == 7)
{
cout << "The shop opens at 9am and closes at 6pm
on Fridays" << endl;
}
else if (a == 'V' || a == 'v')
{
cout << "The shop opens at 9am and closes at 5pm
on Saturdays" << endl;
cout << "The shop opens at 9am and closes at 1pm
on Sundays" << endl;
cout << "The shop opens at 9am and closes at 6pm
on Mondays, Tuesdays, Thursdays, and Fridays" << endl;
cout << "The shop opens at 9am and closes at 8pm
on Wednesdays" << endl;
}
else
{
cout << "Invalid selection" << endl;
}
} while (a != 0);
system("pause");
return 0;
}

You might also like