What is wrong?
#include <iostream>
void main() {//if he insists on using void
char word[25][1000];
int d=0;
while (word[d]!="eof"|d<999) {
cout << "enter the word to sort or eof for terminate";
cin >> word[d];
d++;
}
}
Printable View
What is wrong?
#include <iostream>
void main() {//if he insists on using void
char word[25][1000];
int d=0;
while (word[d]!="eof"|d<999) {
cout << "enter the word to sort or eof for terminate";
cin >> word[d];
d++;
}
}
try...
:)PHP Code:#include <iostream>
using namespace std;
void main()
{
char word[25][1000];
int d=0;
while ((word[d]!="eof") || (d<999))
{
cout << "enter the word to sort or eof for terminate";
cin >> word[d];
d++;
}
}
okay now
does this program fullfill the following question(s)?
Write a program that inputs several lines of text and prints an alphabetical listing of each word in the text and how many times it occurred. Ignore any case differences (e.g., “Cat” and “cat” are the same word). Terminate input by signaling end-of-file from the keyboard. As a minimum requirement, you may assume there will be no punctuation marks and that exactly one space will separate words.
Well, you've got the first part down somewhat, but it doesn't do any of the other stuff if that is your only code..
do u have aim or ICQ so you can help me?
No, but I can tell you to do a search here for 'split' and 'bubble sort' and you should find sime info to help you sort the individual words for each entry.
:)
nothing.
grrrr
I iwsh i knew what I was doing!