括号的问题
#include<iostream.h>void main()
{
int n=0,m=0;
cout<<"请输入两个数字";
cin>>n;
cin>>m;
if(n!=m)
{
if(n<m)
{
cout<<n<<"<"<<m<<endl;
}
else
{
cout<<n<<">"<<m<<endl;
}
}
else
{
cout<<n<<"="<<m<<endl;
}
}
红括号我去掉程序也能运行,问一下加括号与不加的区别。。。。
2010-02-05 13:00
2010-02-05 15:25
2010-02-05 15:29
2010-02-05 16:11
2010-02-05 21:11
2010-03-02 14:48