include<stdio.h>include<conio.h>int tri(int,int,int); int a[100][100]; int s1,s2,val;
getch();
int tri(int i,int j,int n) { if(i>=(n1)) { val= a[i][j];} else { s1=a[i][j]+tri(i+1,j,n); s2=a[i][j]+tri(i+1,j+1,n); if(s1>s2) val=s1; val=s2; } return val;
asked 08 Aug '14, 18:01
