为什么不能运行此程序?

来源:百度知道 编辑:UC知道 时间:2024/06/23 01:18:55
#include<iostream.h>
void main()
{
int x,y;
cout<<"enter x and y:";
cin>>x>>y;
if(x!=y)
if (x>y)
cout<<"X>y"<<endl;
else
cout<<"x<y"<<endl;
else
cou<<"x=y"<<endl;
}
在dev c++4.9.9.2中不能编译,为什么。。。。

#include<iostream.h>
void main()
{
int x,y;
cout<<"enter x and y:";
cin>>x>>y;
if(x!=y)
if (x>y)
cout<<"X>y"<<endl;
else
cout<<"x<y"<<endl;
else
cout<<"x=y"<<endl;
}
检查代码一定要仔细 ``看看你最后的输出流```