Debug

Can someone help me debug this?

// decides if word is in first or last half of alphabet
#include<iostream.h>
#include<conio.h>
void main()
{
char word[20];
cout<<"Enter a word ";
cin>>word;
if(word<= "m")
cot<<word<<" is in the first half of the alphabet"<<edl;
else
cot<<word<<" is in the last half of the alphabet"<<edl;
getch();
}
First, please use code tags when you post code. See http://www.cplusplus.com/articles/jEywvCM9/

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.
closed account (E0p9LyTq)
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> .
Topic archived. No new replies allowed.