diff --git a/du4/program.c b/du4/program.c index 8286384..2cb81f5 100644 --- a/du4/program.c +++ b/du4/program.c @@ -1,11 +1,3 @@ -/****************************************************************************** - - Online C Compiler. - Code, Compile, Run and Debug C program online. -Write your code in this editor and press "Run" button to compile and execute it. - -*******************************************************************************/ - #include #include #include @@ -61,11 +53,17 @@ int main() { char str[100][100]; int i =0; - for(;i<100;i++){ - scanf("%s",str[i]); - } + int j =0; + while((c=getchar())!=EOF){ + if(c=='\n'){ + j=0; + i++; + } + str[i][j]=c; + j++; + } for(int k=0;k