Skip to content

Instantly share code, notes, and snippets.

@elvis-epx
Last active November 25, 2019 18:28
Show Gist options
  • Save elvis-epx/cafaf9aebade599392a46d973e1e639a to your computer and use it in GitHub Desktop.
Save elvis-epx/cafaf9aebade599392a46d973e1e639a to your computer and use it in GitHub Desktop.
Resposta exercicio
Programa gerador:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char*argv[])
{
int n = atoi(argv[1]);
for (int i = 0; i < (2 + n * 2); ++i) {
printf("%d ", n * 3 + i * 2);
}
printf("\n");
}
Seqüência para n=6:
$ ./teste 6
18 20 22 24 26 28 30 32 34 36 38 40 42 44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment