From d66f0cd2419983bceb07b2e141229f2a2459a93b Mon Sep 17 00:00:00 2001 From: Andrii Hermaniuk Date: Fri, 22 Apr 2022 09:13:13 +0200 Subject: [PATCH] add --- du6/program.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 65 insertions(+), 3 deletions(-) diff --git a/du6/program.c b/du6/program.c index 048f816..a24c573 100644 --- a/du6/program.c +++ b/du6/program.c @@ -1,7 +1,69 @@ -#include +#include +#include +#include +#define SIZE 100 - int main(){ +int compare(const void* arg1, const void* arg2); + +int main(){ + + char* pole_smernikov[SIZE]; + memset(pole_smernikov,0,SIZE*sizeof(char*)); + + int pocet_mien_v_poli=0; + + int p = 0; + scanf("%d",&p); + getchar(); + + while(1){ + char line[SIZE]; + memset(line,0,SIZE); + char* r = fgets(line,SIZE,stdin); + + int pocet_znakov=0; + if(!r||r[0]=='\n')break; + else pocet_znakov=strlen(line); + + int skip=0; + for (int i=0;skip==0&&i