English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Write a program to process a text file. The program will determine how many unique words there are in the text file that begin with each letter of the alphabet. The text file name will be given as a command line argument to the program.


Sample Output:
4 words beginning with 'a'/'A':
a, also, and, always
2 words beginning with 'b'/'B':
be, both
:
0 words beginning with 'z'/'Z'

Letter with that began the most words was 'a'/'A'

2006-12-10 06:33:58 · 6 answers · asked by Pushpendra C 1 in Computers & Internet Programming & Design

6 answers

This is how. Note is included all of the enters you typed.
// Get 2000 random bytes
rnd.GetRandomBuffer(pArray, 2000);

BYTE b = rnd.GetRandomByte(); // Get a random byte
WORD w = rnd.GetRandomWord(); // Get a random 4aword
DWORD dw = rnd.GetRandomDWord(); // Get a random 2bword

rnd.Close(); // We don't need true random numbers any more

cout << "4 words beginning with 'a'/'A':";
cout << "a, also, and, always";
cout << "2 words beginning with 'b'/'B':";
cout << "be, both";
cout << ":":
cout << "0 words beginning with 'z'/'Z'";
cout << "Letter with that began the most words was 'a'/'A'";

2006-12-10 06:37:01 · answer #1 · answered by Richard 3 · 0 1

the one thing that drives me nuts is working with someone who has the degree, the grades and seems to know what they are doing on paper, but can't program because they didn't want to do the work.

Read the material you were given, write some pseudo code showing the steps involved in the process you explained, then write the code...........You can probably accomplish this in under 100 lines on code.....that's nothing compared to the real world.

2006-12-10 07:04:06 · answer #2 · answered by Jeffrey F 6 · 0 0

That program is simple - it should take a novice less than half an hour!
Google your homework don't ask us to waste our time.

2006-12-10 06:37:09 · answer #3 · answered by funkymonkeyuni 2 · 2 0

If u need help, u should get a tutor!!!!! Must be a C++ class!!

2006-12-10 06:40:28 · answer #4 · answered by iamrlk 7 · 1 0

you get a c-- for trying to explain the problem you need help with.

2006-12-10 06:36:55 · answer #5 · answered by spyderr911ucf 1 · 1 0

while (!getIt(you))
{
    thinkAboutIt(you);
}
codeIt(you);

2006-12-10 12:11:22 · answer #6 · answered by simguru 2 · 0 0

fedest.com, questions and answers