Can someone help me debug this?

// decides if word is in first or last half of alphabet
void main()
char word[20];
cout<<"Enter a word ";
if(word<= "m")
cot<<word<<" is in the first half of the alphabet"<<edl;
cot<<word<<" is in the last half of the alphabet"<<edl;
First, please use code tags when you post code. See

Does your code compile? If not, what are the exact compiler error messages?
If it compiles, does it crash on running? If yes, how far does it get before the crash?
If it runs to completion, does it produce expected result?

You have to ask and answer these questions.
You have several keywords misspelled:

cot and edl.

You seriously need to update your compiler:

1. C++ has never allowed main() to return void. A void return is older C. C++ main() returns int.

2. Proper and modern C++ it is #include <iostream> .
Registered users can post here. Sign in or register to post.