Code:
#include<iostream>
#include<string.h>
using namespace std;
main()
{
string name,rollno,date;
char character;
cout<<"Enter your Name:";
cin>>name;
cout<<"Enter your roll no:";
cin>>rollno;
cout<<"Enter your date of birth:";
cin>>date;
cout<<"Select Gender(M/F)"<<endl;
cin>>character;
if(character=='m'||character=='M')
cout<<"Your Gender: Male"<<endl;
else if (character=='f'||character=='F')
cout<<"Your Gender: Female"<<endl;
else
cout<<"Must Select Gender"<<endl;
}
No comments:
Post a Comment