76 293
Assignments Done
Successfully Done
In May 2019

Answer to Question #5275 in C++ for zuhaib abbasi

Question #5275
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.
Expert's answer
# include<iostream.h>
# include<conio.h>
void main(){
char a;
cout<<"Please enter a letter: ";
if (a=='m') cout<<"You are male";
else cout<<"You are female";

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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions