diff --git a/du6/program b/du6/program new file mode 100755 index 0000000..2713a09 Binary files /dev/null and b/du6/program differ diff --git a/du6/program.c b/du6/program.c new file mode 100644 index 0000000..a098906 --- /dev/null +++ b/du6/program.c @@ -0,0 +1,25 @@ +#include +#include +#include + +int main(){ + int pocet=0; + char mena[50][50]; + char riadok[50]; + int pocet_mien=0; + + scanf("%d\n", &pocet); + while(fgets(riadok,50,stdin)!=NULL && riadok[0]!='\n'){ + if(riadok[strlen(riadok)-1]=='\n'){ + riadok[strlen(riadok)-1]='\0'; + } + strcpy(mena[pocet_mien],riadok); + pocet_mien++ ; + } + for(int i=0; i