.
This commit is contained in:
parent
bd3bbb3219
commit
bcfd9404f4
BIN
du6/program
Executable file
BIN
du6/program
Executable file
Binary file not shown.
25
du6/program.c
Normal file
25
du6/program.c
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
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<pocet_mien; i++){
|
||||||
|
printf("%s\n", mena[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user