Skip to content

Instantly share code, notes, and snippets.

Avatar
👍
OK

Michel Thomas michelthomas

👍
OK
View GitHub Profile
@michelthomas
michelthomas / aula3.pro
Last active Nov 1, 2019
Casa e barco em prolog.
View aula3.pro
espaco(0).
espaco(E) :- write(" "), E1 is E - 1, espaco(E1).
coluna(0) :- nl.
coluna(C) :- write("x"), C1 is C - 1, coluna(C1).
coluna1(0).
coluna1(C) :- write("x"), C1 is C - 1, coluna1(C1).
colunaY(0) :- nl.
@michelthomas
michelthomas / utils.c
Last active Aug 23, 2019
C utility functions
View utils.c
void readArray(int length, int array[]) {
int i;
for (i = 0; i < length; i++) {
scanf("%d", &array[i]);
}
}
void printArray(int length, int array[]) {
int i;
You can’t perform that action at this time.