封獣★ぬえ
请输入三个整数

这个?

[mw_shl_code=cpp,true]

#include *本站禁止HTML标签噢*

int main()

try{

cout << "请输入三个整数\n";

int item = 0;

cin >> item;

int max = item;

for ( int i = 1; i < 3 && cin >> item; ++i)

if ( item > max) max = item;

if (!cin) throw exception("input expected");

cout << "The max = " << max << '\n';

return 0;

}catch(exception& e){

cerr << e.what() <<'\n';

return 1;

}

[/mw_shl_code]