#include <iostream>
usingnamespace std;
int main()
{
char response;
cout<< "Are you having a good day?"<<endl;
cin>>response;
if (response == 'Y')
{
cout<<"Thats good to hear!"<<endl;
}
elseif (response == 'N')
{
cout<<"Thats too bad..."<<endl;
cout<<"Is there anything I can do?"<<endl;
}
return 0;
}
When i put 'cout<<"Is there anything I can do?"<<endl;' how would i make it to where i could make another responce?[/code]
#include <iostream>
usingnamespace std;
int main()
{
char response;
cout<< "Are you having a good day?"<<endl;
cin>>response;
if (response == 'Y')
{
cout<<"Thats good to hear!"<<endl;
}
elseif (response == 'N')
{
cout<<"Thats too bad..."<<endl;
cout<<"Is there anything I can do?"<<endl;
cin >> response;
if (response == 'Y')
{
cout<<"What can i do?"<<endl;
}
elseif (response == 'N')
{
cout<<"So there's nothing I can do" << endl;
}
}
return 0;
}