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.
1
Expert's answer
2011-11-22T12:27:05-0500
# include<iostream.h> # include<conio.h> void main(){ char a; cout<<"Please enter a letter: "; cin>>a; if (a=='m') cout<<"You are male"; else cout<<"You are female"; getch(); }
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Magnificent