I have a problem with this code can please fix it and explain it for me: //header files #include #include #include //main body int main () { std::string pizza_type; char size; std::cout


I have a problem with this code can please fix it and explain it for me:



//header files


#include


#include


#include


//main body



intmain()


{


        std::string pizza_type;


char size;



        std::cout<"welcome to="" freddy's="">\n\n";


        std::cout<"pizza>\n";


        std::cout<>\t1- Vegetarian Pizza\n";


        std::cout<>\t2- Chicken Dynamite Pizza\n";


        std::cout<>\t3- Vegetarian Lovers Pizza\n";



        std::cout<>\nWhich Pizza would you like to try?\t";


        getline(std::cin,pizza_type);



        std::cout<>\nWhat size of pizza would you like (L,M,S)?\t\t";


        std::cin>>size;




if(size=='L'||size=='M'||size=='S') //checking the selection order of pizza size


        {



if(strcmp(pizza_type.c_str(),"Vegetarian")==0)  //chceking the selection order of pizza type


        {   std::cout<>\n\nPizza Order:\n";


               std::cout<>\nPizza Name:"<>


               std::cout<>\nPreparation Time:20 Minutes\n";


               std::cout<>\nCalories:25\n";


if(size=='L')


                 std::cout<>\nPizza Price:4 OMR\n";


elseif(size=='M')


                 std::cout<>\nPizza Price:3 OMR\n";


else


                 std::cout<>\nPizza Price:2 OMR\n";


               std::cout<>\nToppings:\n";


               std::cout<>\nOnion,Green paper,Olives,Sweet Corn and Mushrooms";


        }



elseif(strcmp(pizza_type.c_str(),"Chicken Dynamite")==0) //chceking the selection order of pizza type


      {


            std::cout<>\n\nPizza Order:\n";


        std::cout<>\nPizza Name:"<>


               std::cout<>\nPreparation Time:20 Minutes\n";


               std::cout<>\nCalories:150\n";


if(size=='L')


                 std::cout<>\nPizza Price:7 OMR\n";


elseif(size=='M')


                 std::cout<>\nPizza Price:5 OMR\n";


else


                 std::cout<>\nPizza Price:3 OMR\n";


               std::cout<>\nToppings:\n";


               std::cout<>\nGrilled Chicken,Cheese,Raunch Sauce,Jalapenos";


          }



elseif(strcmp(pizza_type.c_str(),"Meat Lovers")==0) //chceking the selection order of pizza type


    {   std::cout<>\n\nPizza Order:\n";


        std::cout<>\nPizza Name:"<>


               std::cout<>\nPreparation Time:20 Minutes\n";


               std::cout<>\nCalories:250\n";


if(size=='L')


                 std::cout<>\nPizza Price:8 OMR\n";


elseif(size=='M')


                 std::cout<>\nPizza Price:6 OMR\n";


else


                 std::cout<>\nPizza Price:4 OMR\n";


               std::cout<>\nToppings:\n";


               std::cout<>\nMinced Meat,Cheese,BBQ Sauce,Fresh Tomatos";


        }



else                         //if the selection order is wrong


         std::cout<"wrong>


        }




else                 //if the selection order is wrong


         std::cout<"wrong>



        getch();


return0;


}



> clang++-7 -pthread -std=c++17 -o main main.cpp<br>main.cpp:5:9: fatal error:<br>'conio.h' file not found<br>#include<conio.h><br>1 error generated.<br>compiler exit status 1<br>

Extracted text: > clang++-7 -pthread -std=c++17 -o main main.cpp main.cpp:5:9: fatal error: 'conio.h' file not found #include 1 error generated. compiler exit status 1
> clang++-7 -pthread -std=c++17 -o main main.cpp<br>> ./main<br>Welcome to Freddy's Pizza<br>Pizza Menu:<br>1- Vegetarian Pizza<br>2- Chicken Dynamite Pizza<br>3- Vegetarian Lovers Pizza<br>Which Pizza would you like to try?<br>2<br>What size of pizza would you like (L,M, S) ?<br>wrong selection: L<br>bash: L: command not found<br>

Extracted text: > clang++-7 -pthread -std=c++17 -o main main.cpp > ./main Welcome to Freddy's Pizza Pizza Menu: 1- Vegetarian Pizza 2- Chicken Dynamite Pizza 3- Vegetarian Lovers Pizza Which Pizza would you like to try? 2 What size of pizza would you like (L,M, S) ? wrong selection: L bash: L: command not found

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here