why when I run it ....the output of the "if" statements doesn't come up ...Im trying to see if theres any erros but I just cant find anything please any help I would appreciated

include <iostream>
#include<iomanip>
using namespace std;
int main()
{

char size;
cout<<"******************Welcome to M&D Pizza House*****************\n";
cout<<" What size pizza do you want ? (s = small; m = medium; l = large): ";
cin>>size;

if(size == 's' && size == 'S')

cout<<" Size:	Small";

else if (size == 'm' && size == 'M')
cout<<" Size:	Medium";

else if(size == 'l' && size == 'L')
cout<<" Size:	Large";

return 0;
}

Change the && to ||

Just backing up what firstPerson said. && should be ||

Hi,

Use "or" not "and" in if statement

if(size == 's' || size == 'S')
if(size == 's' || size == 'S')
	cout<<" Size:	Small";

else if (size == 'm' || size == 'M')
	cout<<" Size:	Medium";

else if(size == 'l' || size == 'L')
	cout<<" Size:	Large";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.