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

// Christian James Encio, Francheska Sophia Dela Cruz, Acezhare Angelo Docabo

#include <iostream>
using namespace std;
int main()
{
int pick;
char name[30];
char ans='y';
while (ans=='y')

{
cout<<"What is your name?"<<endl;
cin>>name;
cout<<"Hello "<<name<<endl<<"How are you?"<<endl;
cout<<"

I'm fine"<<endl;

cout<<"

Not okay"<<endl;

cin>>pick;

if (pick>2)
{
cout<<"Please choose only from 1 and 2"<<endl;

}
switch(pick)

case 1:
cout<<"Wow! Have a good day :D"<<endl;
cout<<"Do you want to continue?[y/n]"<<endl;
cin>>ans;
break;

case 2:
cout<<"What is your problem?"<<endl;
cout<<"Do you want to continue?[y/n]"<<endl;
cin>>ans;

}
}

You might also like