Hey guys! i Have a prblm writing a program, i hope i can find help here.... in the prgram i have to take user input on gender as 'm' or 'f' or 'male' or 'female' or 'Male' or 'FmAle'.... what i mean is i the input should not be case sensetive... can anyone please help:)
singhraghav -6 Newbie Poster
Recommended Answers
Jump to Post>> can any one help?
Yes -- but I can't see what you have attempted so you will just have to post your code here.>>the input should not be case sensetive
Convert the input string to all upper or lower case. You can use the toupper() and tolower() …
Jump to Poststring toLowerCase (string s) { string g=s; toLowerCase(g); return g; }
That's not how to convert a string to lower case. Use the tolower() macro in a loop and convert each character
string toLowerCase (string s) { string g = s; for(int i = …
All 11 Replies
Freaky_Chris 299 Master Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
singhraghav -6 Newbie Poster
singhraghav -6 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
mrboolf 122 Junior Poster
singhraghav -6 Newbie Poster
singhraghav -6 Newbie Poster
BeyondTheEye 2 Junior Poster in Training
singhraghav -6 Newbie Poster
unbeatable0 32 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.