0

was just wondering if anyone can help me with some homework. I have been trying to figure this out for a couple hours now. I am sure it is probably simple but I can't get it to run. What I have to do is take user input that contains the word HELL, and censor it to HECK. It needs to know that it is the word HELL and not something that contains it like HELLO. Also, we are not allowed to use the header <string>. This is just a small part of the whole homework so it needs to be a function. Thanks for Helping!!

4
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by dospy
0

Look at each character. When you see an H remember it. If the next letter is E, remember it, else forget everything. Continue until you have all the letters. Now check if there is a letter before or after these letters. If so, ignore it all, otherwise, change the characters

0

Thanks for the reply, but how would I do that. I am kind of new at this.

0

Another way is to
1) read your text book
2) check out some tutorials
3) talk to your instructor
4) try something and see if it works.

We are not a homework service, nor a teaching site. Since your task is very basic, you should have learned the basics in your class and be able to at least do something.

1

more irritant thing is that what you're asking has less matter with c++ and more with logic, you should really try harder, it's not so complicated

Edited by dospy: n/a

Votes + Comments
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.