#include <stdio.h>
int main() {
float sales, commission;
// Input sales amount
printf("Enter the sales amount: ");
// Calculate commission based on the sales amount
if (sales > 5000000) {
commission = sales * 0.15;
} else if (sales > 2500000) {
commission = sales * 0.10;
} else if (sales > 1000000) {
commission = sales * 0.05;
} else if (sales > 500000) {
commission = sales * 0.02;
} else {
commission = sales * 0.01;
}
// Output the commission
printf("The commission is: %.2f\n", commission
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIGZsb2F0IHNhbGVzLCBjb21taXNzaW9uOwoKICAgIC8vIElucHV0IHNhbGVzIGFtb3VudAogICAgcHJpbnRmKCJFbnRlciB0aGUgc2FsZXMgYW1vdW50OiAiKTsKICAgIHNjYW5mKCIlZiIsICZzYWxlcyk7CgogICAgLy8gQ2FsY3VsYXRlIGNvbW1pc3Npb24gYmFzZWQgb24gdGhlIHNhbGVzIGFtb3VudAogICAgaWYgKHNhbGVzID4gNTAwMDAwMCkgewogICAgICAgIGNvbW1pc3Npb24gPSBzYWxlcyAqIDAuMTU7CiAgICB9IGVsc2UgaWYgKHNhbGVzID4gMjUwMDAwMCkgewogICAgICAgIGNvbW1pc3Npb24gPSBzYWxlcyAqIDAuMTA7CiAgICB9IGVsc2UgaWYgKHNhbGVzID4gMTAwMDAwMCkgewogICAgICAgIGNvbW1pc3Npb24gPSBzYWxlcyAqIDAuMDU7CiAgICB9IGVsc2UgaWYgKHNhbGVzID4gNTAwMDAwKSB7CiAgICAgICAgY29tbWlzc2lvbiA9IHNhbGVzICogMC4wMjsKICAgIH0gZWxzZSB7CiAgICAgICAgY29tbWlzc2lvbiA9IHNhbGVzICogMC4wMTsKICAgIH0KCiAgICAvLyBPdXRwdXQgdGhlIGNvbW1pc3Npb24KICAgIHByaW50ZigiVGhlIGNvbW1pc3Npb24gaXM6ICUuMmZcbiIsIGNvbW1pc3Npb24pOwoKICAgIHJldHVybiAwOwp9Cg==