Search found 4 matches

by okokkook
Sat May 10, 2014 1:45 pm
Forum: Volume 105 (10500-10599)
Topic: 10530 - Guessing Game
Replies: 57
Views: 27670

10530 - Guessing Game Who help me? ;'(

I cant find error help :'( #include <stdio.h> #include <string.h> int main(){ int n,down=1,up=10,flag=1; while(scanf("%d",&n)!=EOF && n!=0){ getchar(); char s[20]; gets(s); if(strcmp(s,"too high")==0){ if(n>=down && n<=up && n-1>=down && n-1<=up){ up=n-1; } else{ flag=0; } } else if(strcmp(s,"too lo...
by okokkook
Wed May 07, 2014 5:47 pm
Forum: Volume 115 (11500-11599)
Topic: 11577 - Letter Frequency
Replies: 19
Views: 7141

11577 - Letter Frequency help me :'(

Who can help me I can't find error. #include <stdio.h> #include <ctype.h> int main(){ int n; scanf("%d",&n); getchar(); while(n--){ char s[1000],cnt[26]={0}; gets(s); int i; for(i=0;s[i];i++){ if(s[i]>='A' && s[i]<='Z'){ cnt[s[i]-'A']++; } else if(s[i]>='a' && s[i]<='z'){ cnt[s[i]-'a']++; } } int ma...
by okokkook
Wed May 07, 2014 1:20 pm
Forum: Volume 115 (11500-11599)
Topic: 11577 - Letter Frequency
Replies: 19
Views: 7141

11577 - Letter Frequency

#include <stdio.h> #include <ctype.h> int main(){ int n; scanf("%d",&n); getchar(); while(n--){ char s[1000],cnt[26]={0}; gets(s); int i; for(i=0;s[i];i++){ if(s[i]>='A' && s[i]<='Z'){ cnt[s[i]-'A']++; } else if(s[i]>='a' && s[i]<='z'){ cnt[s[i]-'a']++; } } int max=cnt[0]; for(i=0;i<26;i++){ if(cnt...
by okokkook
Wed Apr 30, 2014 2:07 pm
Forum: Volume 104 (10400-10499)
Topic: 10420 - List of Conquests
Replies: 68
Views: 25886

10420 List of Conquset WA

#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct{ char name[100]; int sum; }country; int main(){ int n; scanf("%d",&n); country c[3000]; int i,j,cnt=0,flag,tp; char s[100],tmp[100]; for(i=0;i<3000;i++){ c[i].sum=0; } for(i=0;i<n;i++){ flag=1; scanf("%s%*s%*s",s); for(j=0;j<...

Go to advanced search