c++ program code needed

write a program in which a string is entered through user and convert into a string whose every odd space has a capital letter and even space has small letter

You don't need code. You need courage to write code yourself. The whole point of homework is that you practice thinking and writing. That is the good way to learn.

See http://www.cplusplus.com/doc/tutorial/
i wrote it but it doesnt works
i have a assignment of 25 questions and i ahve tried many questions about 4-5 times and compketed them but this one isnt that easy...i have done twice
Post the code you have and we could take a look
how should i post it???
so i have to type
Hello panamro,

Welcome to the forum.

This is not a homework site nor do people write code for you. The Idea is you write the code and learn.

Write some code and post it and state where you are having a problem.

Some hints I have for you is a "std::string" can be accessed like an array with a subscript. Include the header file "cctype" and you will have access to the functions "islower()", "isupper()", "tolower()" and "toupper()". This will tell you about these functions. http://www.cplusplus.com/reference/cctype/islower/

Put this together with a for loop and if statements and it should not take to long.

Hope thaat helps,

Andy
can i post a ss of it here??
Hello panamro,

Yes you could post a ss, well more a link to the ss as I do not believe you can post the actual ss here, but it is better to post the code.

You can read these links on how to post code. I kind of like the second one.

http://www.cplusplus.com/articles/jEywvCM9/
http://www.cplusplus.com/articles/z13hAqkS/

Hope that helps,

Andy

Edit:
Last edited on
Code is text. One can copy and paste text between code editor and browser.
Divide and conquer! Plan out your approach step by step.
1. Obtain user input string
2. Manipulate string, following question's rules
3. Output string

Be more specific, show people you've tried, and people will give you more specific help.

To paste code, you can click on the little <> icon, which shows you how to put
[ code ] "Hi I'm Code!" [ /code ]
tags, without spaces near the brackets, around your code. Or you can write the special start and end blocks yourself. Then it becomes syntax highlighted, looking like
"Hi I'm Code!"
Last edited on
Topic archived. No new replies allowed.