hello im having problem trying to get this to do what i want it to do. after the program asks if the user has had any work up to date, i want it to ask for specification if the answer is yes, or go to a next question if no. except right now when the user inputs no, it still asks for specification. if the user inputs yes i want the specification to show in the output at the end. if user said no work was done i just want it to read as a simple no work done. any help would be appreciated. thanks alot!
#include <iostream>
#include <string>
using namespace std;
int main()
{
string Pname, CEmployer, AWUTDspecification;
int age, n, y;
char AWUTD;
n=0;
y=0;
cout<<"Patients Name:"<<endl;
getline (cin, Pname);
cout<<"Age:"<<endl;
cin>>age;
cin.ignore(1000,'\n');
cout<<"Current Employer:"<<endl;
getline (cin, CEmployer);
cout<<"Any Work-Up to Date? Y/N"<<endl;
cin>>AWUTD;
cin.ignore(1000,'\n');
if(AWUTD=='y'||'Y')
{
cout<<"Please Specify:"<<endl;
getline (cin, AWUTDspecification);
}
else if (AWUTD=='n'||'N')
{
cout<<endl;
}
cout<<"Patients Name:"<<Pname<<endl;
cout<<"Patients Age:"<<age<<endl;
cout<<"Patients Current Employer:"<<CEmployer<<endl;
cout<<"Work up to date:"<<AWUTD<<endl;
};