commit f401901fd5c9a51de576710bbba025477bfe4155
parent 69c4c081c95cef2f2414c3bd4ae07903fd38881b
Author: klewer-martin <martin.cachari@gmail.com>
Date: Mon, 29 Mar 2021 22:36:39 -0300
Update;
Diffstat:
4 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/guia03/ex42/ex42.c b/guia03/ex42/ex42.c
@@ -0,0 +1,24 @@
+#include <stdio.h>
+
+#define LANG_DE
+
+#ifdef LANG_ES
+ #include "include/LANG_ES.h"
+#elif defined LANG_EN
+ #include "include/LANG_EN.h"
+#elif defined LANG_DE
+ #include "include/LANG_DE.h"
+#endif
+
+typedef enum { JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC } month_t;
+
+int main (void)
+{
+ month_t month;
+
+ month = MAR;
+
+ printf("Month: %s\n", months[month]);
+
+ return 0;
+}
diff --git a/guia03/ex42/include/LANG_DE.h b/guia03/ex42/include/LANG_DE.h
@@ -0,0 +1,6 @@
+#ifndef LANG_EN_H
+#define LANG_EN_H
+
+const char months[][10] = { "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember" };
+
+#endif
diff --git a/guia03/ex42/include/LANG_EN.h b/guia03/ex42/include/LANG_EN.h
@@ -0,0 +1,6 @@
+#ifndef LANG_EN_H
+#define LANG_EN_H
+
+const char months[][10] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };
+
+#endif
diff --git a/guia03/ex42/include/LANG_ES.h b/guia03/ex42/include/LANG_ES.h
@@ -0,0 +1,6 @@
+#ifndef LANG_ES_H
+#define LANG_ES_H
+
+const char months[][10] = { "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre" };
+
+#endif