#include <stdio.h>
int main() {
int X = 0, Y = 0, par = 0, impar = 1;
printf("Insira o VALOR DE X: "); printf("Insira o VALOR DE Y: "); if (Y <= X) {
printf("X não pode ser maior que Y\n"); return 0;
}
for (int cont = X; cont <= Y; cont++) {
if (cont % 2 == 0) par += cont;
else impar *= cont;
}
printf("A soma dos números pares nesse intervalo é %d\n", par
); printf("A multiplicação dos números impares nesse intervalo é %d\n", impar
); }
//https://pt.stackoverflow.com/q/218612/101
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIGludCBYID0gMCwgWSA9IDAsIHBhciA9IDAsIGltcGFyID0gMTsKICAgIHByaW50ZigiSW5zaXJhIG8gVkFMT1IgREUgWDogIik7CiAgICBzY2FuZigiJWQiLCAmWCk7CiAgICBwcmludGYoIkluc2lyYSBvIFZBTE9SIERFIFk6ICIpOwogICAgc2NhbmYoIiVkIiwgJlkpOwogICAgaWYgKFkgPD0gWCkgewogICAgICAgIHByaW50ZigiWCBuw6NvIHBvZGUgc2VyIG1haW9yIHF1ZSBZXG4iKTsKICAgICAgICByZXR1cm4gMDsKICAgIH0KICAgIGZvciAoaW50IGNvbnQgPSBYOyBjb250IDw9IFk7IGNvbnQrKykgewogICAgICAgIGlmIChjb250ICUgMiA9PSAwKSBwYXIgKz0gY29udDsKICAgICAgICBlbHNlIGltcGFyICo9IGNvbnQ7CiAgICB9CiAgICBwcmludGYoIkEgc29tYSBkb3MgbsO6bWVyb3MgcGFyZXMgbmVzc2UgaW50ZXJ2YWxvIMOpICVkXG4iLCBwYXIpOwogICAgcHJpbnRmKCJBIG11bHRpcGxpY2HDp8OjbyBkb3MgbsO6bWVyb3MgaW1wYXJlcyBuZXNzZSBpbnRlcnZhbG8gw6kgJWRcbiIsIGltcGFyKTsKfQoKLy9odHRwczovL3B0LnN0YWNrb3ZlcmZsb3cuY29tL3EvMjE4NjEyLzEwMQ==