How can I solve this problem?
Please help me solve this problem.
By pseudo-code.
Please makes it easy to understand.
I can't solve this problem. Because I just learned basic programming.
Thank You! so much
How can I solve this problem?
Please help me solve this problem.
By pseudo-code.
Please makes it easy to understand.
I can't solve this problem. Because I just learned basic programming.
Thank You! so much
Looks like homework... If the person who assigned it to you thinks you should be capable of it then I don't see why we should think any different.
This is pretty straight forward in pseudo-code... just consider the following:
1. How would you define a "word" as it pertains to text in a paragraph.
2. How would you eliminate characters that aren't part of the words.
3. How would you check each word one at a time.
There is nothing in this problem that would require anything more than "basic programming." The general rule about how these things work on this forum, though, is that you give it your best try, post it, and we'll critique you if we feel it will not harm your studies (or we just don't care).
Sent from my iPadŽ
I disagree, I doubt very much this is homework. It looks like an assignment in the ACM ICPC programming contest, and if there's any professor steasling those assignments to give as homework... Well, that'd be strange: he should at least edit it to fit in his own course.
Actually, last time I saw a problem named "X" it was during the test phase, where they give three extremely easy problems (X, Y, Z) so you can test how the system works...
About the algorithm. Well, it's fairly straightforward: Scan the text in a single pass, detect any start-of-word and end-of-word character and for each of those pairs detect the length. If the length is longer than your current maximum then store it. Finally, output what you have stored.
As you see, the description of the algorithm is little more than the description of the problem. That's how straightforward it is. Have a go at it or ask a more specific question. Try to do as much of it as you can first, though.
I don't see how referring to a programming contest in the input text somehow makes it unsuitable for college coursework... and teachers rip assignments from programming contests all of the time.
The fact is, people who actively look for programming assignments on the internet to improve their skills don't give up without an attempt and post the problem on a programming forum asking for a complete solution.
Sent from my iPadŽ
> I can't solve this problem. Because I just learned basic programming.
So learn to crawl faster, then learn to walk, before trying to run.
Pick problems which are just out of range of your current skill, so you learn one new thing with each problem you solve.
Simply giving you the answer here won´t change how fast you actually learn.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.