Search found 1 match

by logic
Wed Feb 09, 2005 8:13 am
Forum: Volume 100 (10000-10099)
Topic: 10037 - Bridge
Replies: 84
Views: 23954

10037:Please Help me,Please look at my code

The judge says Compilation error #include<stdio.h> int sum=0; int a[1000]; void find(int i,int j) { if(i==j) { sum+=a[j]; //printf("%d %d",a[0],a[1]); return; } sum+=2*a[j]+a[j+1]; sum+=a[i-1]; if(i+2<j) find(i+2,j); else { if(j-i==1) sum+=a[j]; else sum+=a[i+1]+a[j]+a[j+1]; } } void cal(int i,int j...

Go to advanced search