#include <cstdlib>
#include <iostream>
usingnamespace std;
int main(int argc, char *argv[])
{
string answer;
cout<< "what is your favorite book?\n";
cin>> answer;
if (answer == "Pearls Before Swine")
{
cout<<"good job\n";
cin.ignore();
cin.ignore();
return 0;
}
if (answer != "Pearls Before Swine")
{
cout<< "NOOOOOOOOOO\n";
cout<< " your face is so ugly im shutting down the program\n";
cin.ignore();
cin.ignore();
return 0;
}}
My Probelm is that the program shuts down before you can read the post
can someone help?
#include <cstdlib>
#include <iostream>
usingnamespace std;
int main(int argc, char *argv[])
{
string answer;
cout<< "what is your favorite book?\n";
cin>> answer;
if (answer == "Pearls Before Swine")
{
cout<<"good job\n";
cin.ignore();
cin.ignore();
return 0;
}
if (answer != "Pearls Before Swine")
{
cout<< "NOOOOOOOOOO\n";
cout<< " your face is so ugly im shutting down the program\n";
getch();