Search found 2 matches

by buppy
Tue Nov 08, 2011 11:41 pm
Forum: Volume 112 (11200-11299)
Topic: 11244 - Counting Stars
Replies: 21
Views: 10396

Re: 11244 - Counting Stars

help,i am getting wa #include<stdio.h> #include<string.h> char a[105][105],c; int size,hv,m,n,f; int main() { int i,j,f; while(scanf("%d%d",&m,&n)==2&&(m+n)) { scanf("%c",&c); f=0; for(i=0;i<m;i++) gets(a[i]); for(i=0;i<m;i++){ for(j=0;j<m;j++){ if(a[i][j]=='*'&&i>0&&i!=m-1){ if(a[i][j-1]=='*'||a[i]...
by buppy
Tue Nov 08, 2011 11:35 pm
Forum: Volume 113 (11300-11399)
Topic: 11398 - The Base-1 Number System
Replies: 23
Views: 9700

Re: 11398 - The Base-1 Number System

can any one help why i am getting wa, #include<stdio.h> #include<math.h> int main() { char ch,f,ch1[100]; int i,j,len,sp,c,d,o=0; double sum,sum1,k; len=0; sp=0; j=0; while(scanf("%c",&ch)==1){ if(ch=='0') len++; else if(ch==' ') { sp++; if(sp==1&&len>2) o=1; else if((len==1||len==2)&&sp%2!=0) { c=l...

Go to advanced search