因为你的int main(),所以你在else{}里也应该有return 语句。否则不能通过编译的。
#include
using namespace std;
int main()
{
int n,savings,expenses;
cout<<"Enter two numbers:\n";
cin>>savings>>expenses;
n=savings-expenses;
if(n>0)
{
cout<<"Solvent"<<"\n";
cout<
}else
{
cout<<"Bankrupt";
}
}