主题:求助在VC++练习题时的问题,请大虾指教
#include <iostream>
using namespace std;
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;
}
请问错在哪?我作其他的练习也是同样错误,都提示在后面的}这里错
using namespace std;
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;
}
请问错在哪?我作其他的练习也是同样错误,都提示在后面的}这里错