Help me in solving URCALC problem

My issue

include <bits/stdc++.h>
using namespace std;

int main() {
// your code goes here
int a,b;
char c;
cin>>a;
cin>>b;
cin>>c;
switch(c){
case ‘+’:
cout<<a+b;
break;
case ‘-’:
cout<< a-b;
break;
case '':
cout<<a
b;
break;

    case '/':
    cout<<a/b;
    break;
}

}

My code

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
	int a,b;
	char c;
	cin>>a;
	cin>>b;
	cin>>c;
    switch(c){
        case '+':
        cout<<a+b;
        break;
        case '-':
        cout<< a-b;
        break;
        case '*':
         cout<<a*b;
        break;
        
        case '/':
        cout<<a/b;
        break;
    }
	 

}

Problem Link: Program Your Own CALCULATOR Practice Coding Problem - CodeChef

Use printf to get precision upto 6th place of decimal in case of division.

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
	int a,b;

	char c;
	cin>>a;
	cin>>b;
	cin>>c;
    switch(c){
        case '+':
        cout<<a+b;
        break;
        case '-':
        cout<< a-b;
        break;
        case '*':
         cout<<a*b;
        break;
        
        case '/':
        printf("%.6f",(1.0*a)/b) ;     //1.0 is multiplied to convert int to float
        break;
    }
	 

}