From 0acf6d478273106961a18478359d7066d59e6730 Mon Sep 17 00:00:00 2001 From: Bohdan Yanchyk Date: Thu, 2 Apr 2020 23:47:55 +0000 Subject: [PATCH] =?UTF-8?q?Aktualizovat=20=E2=80=9Edu4/program.c=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du4/program.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/du4/program.c b/du4/program.c index a5e2978..865d4a4 100644 --- a/du4/program.c +++ b/du4/program.c @@ -54,12 +54,13 @@ int main() char str[100][100]; int i =0; int j =0; - while((c=getchar())!=EOF){ - if(c=='\n'){ + char b ; + while((b=getchar())!=EOF){ + if(b=='\n'){ j=0; i++; } - str[i][j]=c; + str[i][j]=b; j++; } for(int k=0;k