From d5037ad53f1819dd61b461906605af7c6b4dbaa8 Mon Sep 17 00:00:00 2001 From: "jerome.maison" <jerome.maison@etu.hesge.ch> Date: Tue, 24 Jan 2023 15:55:12 +0100 Subject: [PATCH] exo3 --- exo3/Makefile | 6 +++--- exo3/exo3.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/exo3/Makefile b/exo3/Makefile index 7fe152e..4175d34 100644 --- a/exo3/Makefile +++ b/exo3/Makefile @@ -7,8 +7,8 @@ LDFLAGS:=-lm -ex3: ex3.c - $(CC) $(CFLAGS) -c $@ $^ $(LDFLAGS) +exo3: exo3.c + $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) clean: - rm -f *.o ex3 + rm -f *.o exo3 diff --git a/exo3/exo3.c b/exo3/exo3.c index e69de29..6f78d84 100644 --- a/exo3/exo3.c +++ b/exo3/exo3.c @@ -0,0 +1,28 @@ +#include <stdio.h> +#include <stdbool.h> + +typedef struct element{ + int data; + struct dll *next; // go to tail + struct dll *prev; // go to head +}element; + +typedef struct dll +{ + element *pos; + element *head; +}dll; + +dll dll_creat(); +void dll_print(); + + +int main() { + int len; + int val1; + int val2; + int val3; + int list = scanf("%d %d %d %d", &len, &val1, &val2, &val3); + // printf("%d\n%d\n%d\n%d\n", len, val1, val2, val3); + +} \ No newline at end of file -- GitLab