#include <iostream>
#include <cmath>
using namespace std;
int main() {
int x;
cout << "Enter the value of x: ";
cin >> x;
switch (x) {
case 6: {
double a = 2;
double b = 3;
double result1 = a * x + b * x * x;
cout << "For x = 6, ax + bx*x = " << result1 << endl;
break;
}
case 2: {
double e = exp(1);
double result2 = e + x * x;
cout << "For x = 2, e + x*x = " << result2 << endl;
break;
}
case 7: {
double b = 1;
double result3 = sin(2 * b * x);
cout << "For x = 7, sin(2 * b * x) = " << result3 << endl;
break;
}
default:
cout << "No operation defined for this value of x." << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+IAoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewogICAgaW50IHg7CiAgICBjb3V0IDw8ICJFbnRlciB0aGUgdmFsdWUgb2YgeDogIjsKICAgIGNpbiA+PiB4OwoKICAgIHN3aXRjaCAoeCkgewogICAgICAgIGNhc2UgNjogewogICAgICAgICAgICBkb3VibGUgYSA9IDI7CiAgICAgICAgICAgIGRvdWJsZSBiID0gMzsKICAgICAgICAgICAgZG91YmxlIHJlc3VsdDEgPSBhICogeCArIGIgKiB4ICogeDsKICAgICAgICAgICAgY291dCA8PCAiRm9yIHggPSA2LCBheCArIGJ4KnggPSAiIDw8IHJlc3VsdDEgPDwgZW5kbDsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgICAgIGNhc2UgMjogewogICAgICAgICAgICBkb3VibGUgZSA9IGV4cCgxKTsgCiAgICAgICAgICAgIGRvdWJsZSByZXN1bHQyID0gZSArIHggKiB4OwogICAgICAgICAgICBjb3V0IDw8ICJGb3IgeCA9IDIsIGUgKyB4KnggPSAiIDw8IHJlc3VsdDIgPDwgZW5kbDsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgICAgIGNhc2UgNzogewogICAgICAgICAgICBkb3VibGUgYiA9IDE7CiAgICAgICAgICAgIGRvdWJsZSByZXN1bHQzID0gc2luKDIgKiBiICogeCk7CiAgICAgICAgICAgIGNvdXQgPDwgIkZvciB4ID0gNywgc2luKDIgKiBiICogeCkgPSAiIDw8IHJlc3VsdDMgPDwgZW5kbDsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgIGNvdXQgPDwgIk5vIG9wZXJhdGlvbiBkZWZpbmVkIGZvciB0aGlzIHZhbHVlIG9mIHguIiA8PCBlbmRsOwogICAgfQoKICAgIHJldHVybiAwOwp9Cg==