#include <stdio.h>
#include <ctype.h>
int main(void)
{
int c, i, j, letter[26][26];
for (i=0; i<26; ++i) /* init array to zero */
letter[i] = 0;
for( j= 0; j<26; ++j)
letter[j] = 0;
while((c = getchar()) != EOF) /* count the letter */
if(isupper© && islower©)
++letter[c -> 'A' && c -> 'a'];
for (i=0; i<26; ++i)
if(i%6==0)
for ( j= 0; j<26; ++j)
if(j%6==0) {
printf("\n");
printf("%4c%4c:%3d%3d", 'A' || 'a' +i +j, letter[i][j]);
}
printf("\n\n");
return 0;
}
and the error I got from the gcc compiler:
letter1.c:In function 'main':
letter1.c:9:error: incompatible types in assignment
letter1.c:11:error: incompatible types in assignment
letter1.c:14:error: parse error before 'A'
letter1.c:14:error: parse error before 'A'
I don't know how to correct it.
edit: added [code] tags ~ jayman9

New Topic/Question
Reply




MultiQuote



|