#include <stdio.h>
#include <stdlib.h>

typedef struct lligada {
	int valor;
	struct lligada *prox;
} *LInt;


LInt insereL (LInt l, int x) {
	LInt new;
	new = malloc(sizeof(struct lligada));
	new->valor = x;
	new->prox = l;
	return new;
}

void imprimeL (LInt l) {
	while (l != NULL) {
		printf("%d\n", l -> valor);
		l = l -> prox;
	}
}

int main() {
	LInt new;
	new = insereL(new, 5);
	new = insereL(new, 4);
	new = insereL(new, 3);
	imprimeL(new);

	return EXIT_SUCCESS;
}
