c-first-steps

a C playground
Index Commits Files Refs README
commit ad3e76e90830954430b6f71e02fe19c82d71c6d8
parent ad9df424694f43f76e1607c0f8c0a23b79d8cf87
Author: Martin J. Klöckner <64109770+klewer-martin@users.noreply.github.com>
Date:   Sat, 14 Nov 2020 12:37:28 -0300

Delete ej7_2.c
Diffstat:
Dguia02/ej7_2.c | 42------------------------------------------
1 file changed, 0 insertions(+), 42 deletions(-)
diff --git a/guia02/ej7_2.c b/guia02/ej7_2.c
@@ -1,42 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#define MAX_LEN 5    // max digits of the entered degree;
-#define ERR_MSG_LEN "El angulo ingresado contiene demasiados digitos"
-
-typedef enum {
-    AGUDO, OBTUSO, RECTO
-} angulo_t;
-
-void clean(char *buffer)
-{
-    for(size_t i = 0; i < MAX_LEN; i++)
-        buffer[i] = '\0';
-}
-
-
-int main(void) {
-    
-    char buffer[MAX_LEN];
-    int c, d, i;
-    i = 0;
-
-    while((c = getchar()) != EOF) {
-        if(c != '\n') {
-            if(i < MAX_LEN) {
-                buffer[i] = c;
-                i++;
-            } else if(i > MAX_LEN) {
-                fprintf(stderr, ERR_MSG_LEN"\n");
-                return 1;
-            }
-        }
-    i = 0;
-    d = atoi(buffer);
-    printf("%d\n", d);
-    clean(buffer);
-    }
-
-    return 0;
-}