Skip to content

Instantly share code, notes, and snippets.

@joffilyfe
Created January 18, 2015 17:19
Show Gist options
  • Save joffilyfe/b16b675c603633659b78 to your computer and use it in GitHub Desktop.
Save joffilyfe/b16b675c603633659b78 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(void) {
int x, y, sum, i, entrada, j, aux, loops = 0;
sum = 0;
while(scanf("%d", &entrada) && entrada != 0) {
sum = 0;
loops = 0;
while (loops < 5) {
if (entrada % 2 == 0) {
sum += entrada;
loops++;
}
entrada++;
}
printf("%d\n", sum);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment