Search found 2 matches

by saadmanheavy
Thu Nov 17, 2016 2:54 pm
Forum: Volume 115 (11500-11599)
Topic: 11577 - Letter Frequency
Replies: 19
Views: 10212

Re: 11577 - Letter Frequency

Can anyone point out the mistake ? Thanks ! #include <stdio.h> #include <string.h> int main() { int n,len,j,ar[26],i,k,index=0,temp,max; char c[202],alp[26],a; while(scanf("%d\n",&n)==1) { for(i=0; i<n; i++) { gets(c); len = strlen(c); while( c[index] ) { c[index]=(tolower(c[index])); ...
by saadmanheavy
Fri Dec 11, 2015 9:46 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 143572

Re: 10038 - Jolly Jumpers

What is wrong with this code: #include <stdio.h> #include <math.h> int main() { int n; int ar[3001]; while(scanf("%d", &n)!=EOF) { int ar1[n-1],i,flag=0; for(i=0; i<n; i++) { scanf("%d", &ar[i]); } for (i=0; i<n; i++) { ar[i]=abs(ar[i]); } int j=0,k=0; for(i=0; i<n-1; i++...

Go to advanced search