From 9cb070097ebf4692ae2bcb23e854a3e4ffdccd53 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Fri, 26 Sep 2025 12:24:19 +0200 Subject: Cours du 22 au 26 septembre --- .../architecture des ordinateurs/tme/tme2/exo1/q1.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 semestre 3/architecture des ordinateurs/tme/tme2/exo1/q1.c (limited to 'semestre 3/architecture des ordinateurs/tme/tme2/exo1/q1.c') diff --git a/semestre 3/architecture des ordinateurs/tme/tme2/exo1/q1.c b/semestre 3/architecture des ordinateurs/tme/tme2/exo1/q1.c new file mode 100644 index 0000000..83f9ece --- /dev/null +++ b/semestre 3/architecture des ordinateurs/tme/tme2/exo1/q1.c @@ -0,0 +1,17 @@ +#include + +int main(){ + int i; + for(i = 0; i>= 0; i++); + printf("int\nmax: %d\nmin: %d\n\n", i-1, i); + + char j; + for(j = 0; j>= 0; j++); + printf("char\nmax: %d\nmin: %d\n\n", (char) (j-1), j); + + short k; + for(k = 0; k>= 0; k++); + printf("short\nmax: %d\nmin: %d\n\n", (short) (k-1), k); + + return 0; +} -- cgit v1.2.3