68 447
Assignments Done
98,6%
Successfully Done
In December 2018

Answer to Question #63327 in C++ for helmi

Question #63327
(im bad at english)
how do u code for choice using programming c++
i.e. what shoes do u want to buy
1)heels
2)without heels

such like tht
Expert's answer
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
char choise='\0';
cout<<"what shoes do u want to buy?"<<endl;
cout<<"1)heels\n 2)without heels"<<endl;
cout<<"Your choise: ";
cin>>choise;
if(choise=='1')
{

//u`ve selected shoes with heels
}
else if(choise=='2')
{
//u`ve selected shoes without heels
}
else
{
//invalid input.
}
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions