#include <stdio.h>

double Mult(double a, double b){
    return a*b;
}
double Div(double a, double b){
    return a/b;
}

int main() {
    char ope;
    double a, b;

    scanf("%c", &ope);
    scanf("%lf %lf", &a, &b);

    if(ope == 'M') printf("%.2lf", Mult(a, b));
    
    else printf("%.2lf", Div(a,b));
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: