Skip to content

Instantly share code, notes, and snippets.

View michelthomas's full-sized avatar
👍
OK

Michel Thomas michelthomas

👍
OK
  • Maceió, Alagoas
View GitHub Profile
https://hastebin.com/esuzaqeyoh.cpp
@michelthomas
michelthomas / aula3.pro
Last active November 1, 2019 13:16
Casa e barco em prolog.
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 August 23, 2019 03:34
C utility functions
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;