#include <stdio.h>
int main() {
int prendasVendidas;
float sueldoBase = 800.0;
float sueldoFinal;
printf("Ingrese la cantidad de prendas vendidas: "); scanf("%d", &prendasVendidas
);
if (prendasVendidas >= 18) {
sueldoFinal = 2060.0;
} else if (prendasVendidas >= 12) {
sueldoFinal = 1340.0;
} else if (prendasVendidas >= 8) {
sueldoFinal = 1000.0;
} else {
sueldoFinal = sueldoBase;
}
printf("El sueldo final del vendedor es: $%.2f\n", sueldoFinal
);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIGludCBwcmVuZGFzVmVuZGlkYXM7CiAgICBmbG9hdCBzdWVsZG9CYXNlID0gODAwLjA7CiAgICBmbG9hdCBzdWVsZG9GaW5hbDsKCiAgICBwcmludGYoIkluZ3Jlc2UgbGEgY2FudGlkYWQgZGUgcHJlbmRhcyB2ZW5kaWRhczogIik7CiAgICBzY2FuZigiJWQiLCAmcHJlbmRhc1ZlbmRpZGFzKTsKCiAgICBpZiAocHJlbmRhc1ZlbmRpZGFzID49IDE4KSB7CiAgICAgICAgc3VlbGRvRmluYWwgPSAyMDYwLjA7CiAgICB9IGVsc2UgaWYgKHByZW5kYXNWZW5kaWRhcyA+PSAxMikgewogICAgICAgIHN1ZWxkb0ZpbmFsID0gMTM0MC4wOwogICAgfSBlbHNlIGlmIChwcmVuZGFzVmVuZGlkYXMgPj0gOCkgewogICAgICAgIHN1ZWxkb0ZpbmFsID0gMTAwMC4wOwogICAgfSBlbHNlIHsKICAgICAgICBzdWVsZG9GaW5hbCA9IHN1ZWxkb0Jhc2U7CiAgICB9CgogICAgcHJpbnRmKCJFbCBzdWVsZG8gZmluYWwgZGVsIHZlbmRlZG9yIGVzOiAkJS4yZlxuIiwgc3VlbGRvRmluYWwpOwoKICAgIHJldHVybiAwOwp9Cg==