how do you exit from the program?
Code:
#include<stdio.h>
main()
{
int str[10][10];
int a[10];
int m,c,i,j;
{
for(i=0;i<10;i++)
for(j=0;j<10;j++)
c=getchar();
c=str[i][j];
/* if fyou're assigning letters to str[][], then str[][], needs to be on the left
hand side of this assignment code, not the right hand side.
*/
{
a[i]=0;
for(i=0;i<10;i++)
for(j=0;j<10;j++)
while(str[i][j]=='\n'||str[i][j]=='\0')
a[i]+=1;
}
i=0;
if(a[i]<=a[i+1]&&i<9)
m=a[i+1];
else
m=a[i];
i++;
printf("%d\n",m);
}
}
i just compiled and gcc gave me the errors...
i corrected the errors and gave you the corrected code...the logic is up to you