Hi:
i am new to C++.. can u help me write a simple program in C++ to take an input of words and just return them in the reverse order..just the words alone not the characters..

thanks
Kavitha.

Recommended Answers

All 4 Replies

Sure, what's your definition of "help".

If by "help" you mean you do some work, get stuck, post what you've achieved so far and ask a question about why it doesn't work, or what to do next, then sure, we can help.

But if your definintion of "help" is posting your assignment on a message board and hoping someone will give you the answer on a plate while you go off any party or something, then the answer is a most definite NO!.

Member Avatar for iamthwee

I would think stringstreams would be ideal for this if you are allowed to use them. However, it depends if you wish to preserve the whitespace (spaces and tabs etc). In which case, you might have to think up something else.

i dunno this is suitable for u or not, i'll try to help u..

cout<<"Enter any character u want to reverse : ";
	cin>>character;
	cout<<"Done ! Your Input had Reversed : ";

	do
	{
		ans=character % 10;
		character=character/10;
		cout<<ans;

	}
	while (grade!=0);
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.