Answer to Question #5275 in C++ for zuhaib abbasi
write a program in c++ to input a single letter in a char variable.if "m"is input print "you are male"otherwise print you are female"by using conditional expression operator.
cout<<"Please enter a letter: ";
if (a=='m') cout<<"You are male";
else cout<<"You are female";
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments: C++
Leave a comment