My issue
Why is it showing wrong answer?
My code
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin >> a >> b;
string s;
cin >> s;
if(s == "+")
{
cout << a + b ;
}
else if(s == "-")
{
cout << a - b ;
}
else if(s == "*")
{
cout << a * b ;
}
else if(s == "/")
{
cout << fixed << setprecision(6) << (float)a/b ;
}
}
Problem Link: Program Your Own CALCULATOR Practice Coding Problem - CodeChef