老师,代码有问题吗?怎么无法运行?
int main(void)
{
int x = 0;
cout<<"请输入一个整数:"<<endl;
cin>>x;
cout<<oct<<x<<endl;
cout<<dec<<x<<endl;
cout<<hex<<x<<endl;
cout<<"请输入一个布尔值(0,1):"<<endl;
bool y = false;
cin>>y;
cout<<boolalpha<<y<<endl;
system("pause");
return ();
}
int main(void)
{
int x = 0;
cout<<"请输入一个整数:"<<endl;
cin>>x;
cout<<oct<<x<<endl;
cout<<dec<<x<<endl;
cout<<hex<<x<<endl;
cout<<"请输入一个布尔值(0,1):"<<endl;
bool y = false;
cin>>y;
cout<<boolalpha<<y<<endl;
system("pause");
return ();
}
2016-11-08
举报