Help me in solving URCALC problem

My issue

Explain the approach

My code

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

int main() {
	// your code goes here
	float a;
	cin>>a;
	float b;
	cin>>b;
	char c;
	cin>>c;
	switch(c){
	    case '+':
	        cout<<a+b<<endl;
	        break;
	    case '-':
	        cout<<a-b<<endl;
	        break;
	    case '*':
	        cout<<a*b<<endl;
	        break;
	    case '/':
	        while(b!=0){
	            cout<<fixed<<setprecision(7)<<a/b<<endl;
	            break;
	        }
	        break;
	    default:
	        cout<<"Error"<<endl;
	}
	

}

Problem Link: Program Your Own CALCULATOR Practice Coding Problem