finalcloud13
10-30-2007, 03:54 AM
In my entry-level computer science course, the professor wants us to write a little program that will classify a message as spam or not. Some of the instructions that are giving me trouble are the following:
1. "Enter the body of the email. Press enter on an empty line to finish." I don't understand how to do this. To make myself clear here, I mean that the user has to press Enter on an empty line in order to finish writing the body part. Example:
//This is what I want, but don't have.
Hi mom. <-- the user is able to hit the Enter key on this line
<-- and again on this line to submit the body.
//This is what I have, but don't want.
Hi mom. <-- the user is only able to press Enter once before the program takes the input.
2. What do I do to check if a string has least one word, and more than 90% of the words in the subject line consist of only uppercase letters?
More questions to come soon :x Thanks in advance.
1. "Enter the body of the email. Press enter on an empty line to finish." I don't understand how to do this. To make myself clear here, I mean that the user has to press Enter on an empty line in order to finish writing the body part. Example:
//This is what I want, but don't have.
Hi mom. <-- the user is able to hit the Enter key on this line
<-- and again on this line to submit the body.
//This is what I have, but don't want.
Hi mom. <-- the user is only able to press Enter once before the program takes the input.
2. What do I do to check if a string has least one word, and more than 90% of the words in the subject line consist of only uppercase letters?
More questions to come soon :x Thanks in advance.