谁能给我一点提示?
#include <iostream>
#include <cmath>
using namespace std;
int main(){
double a,b;
char ch;
cin>>a>>b>>ch;
if(ch=='+'){
cout<<a+b;
}
else if(ch=='-'){
cout<<a-b;
}
else if(ch=='*'){
cout<<a*b;
}
else if(ch=='/'&&b!=0){
cout<<a/b;
}
else if(ch=='/'&&b==0){
cout<<"Divided by zero!";
}
else{
cout<<"Invalid operator!";
}
return 0;
}