From f6ed1a2723387db40b9084ee6f1209596136dbe2 Mon Sep 17 00:00:00 2001 From: celso Date: Wed, 9 Nov 2022 21:17:22 -0300 Subject: [PATCH] nineteenth exercise --- 1-19.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 1-19.c diff --git a/1-19.c b/1-19.c new file mode 100644 index 0000000..0ef63d1 --- /dev/null +++ b/1-19.c @@ -0,0 +1,32 @@ +#include +#define MAXLINE 1000 + +int ggetline(char line[], int maxline){ + int c, i; + for(i=0; i=0){ + putchar(s[i]); + i--; + } + putchar('\n'); +} + +int main(){ + char line[MAXLINE]; + int len; + while((len=ggetline(line, MAXLINE))>0){ + reverse(line); + } + return 0; +}