[求助]帮帮这个菜鸟吧
#include<exception>#include<iostream>
int main(){
try{
int i(0);
int biggest(0);
do{
std::cout << "Type in a positive number";
std::cout << "(zero or a nagative number ends the program):";
std::cin >> i;
if(not std::cin){
std::cout << "The biggest value so far was " << biggest <<'\n';
throw std::exception();
}
if (i<1) break;
if (biggest< i) biggest=i;
}while(true);
std::cout << "The smallest number input was " <<tsmallest << '\n';
}
catch(...){
std::cerr << "***An exception was thrown.***\n";
}
}