Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
14% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
6
Posts with Downvotes
5
Downvoting Members
4
7 Commented Posts
0 Endorsements
~10K People Reached
Favorite Forums
Favorite Tags
c++ x 6

3 Posted Topics

Member Avatar for payara111

How can i print it recursively with one helper function? [img]http://img2.imageshack.us/img2/1690/recursive.th.jpg[/img] Here, n will always be a power of 2 and c will be indicating the column number from which to start the output. The above pattern has been produced with the initial function call RecursivePattern(8,1) It prototype should be …

Member Avatar for Chetana_1
-1
2K
Member Avatar for JaksLax

[QUOTE]Try this one[/QUOTE] [CODE]#include<iostream.h> #include<conio.h> int find(int *a,int start,int end) { if(start<end) { if(a[start]<a[end]) { cout<<"1st Arrys condition"<<a[start]<<" "<<a[end]<<endl; return find(a,start+1,end); } else cout<<"2nd Arrys condition"<<a[start]<<" "<<a[end]<<endl; return find(a,start,end-1); } cout<<"Last= "<<a[end]<<endl; } void main() { clrscr(); const int size=8; int arr[size]={7,6,13,12,2,9,5,99}; for(int i=0;i<size;i++) { cout<<arr[i]<<" "; } cout<<endl; find(arr,0,size-1); …

Member Avatar for payara111
0
7K
Member Avatar for anga08628

[QUOTE]Try It, I think it will solve your problem[/QUOTE] [CODE]#include<iostream.h> #include<conio.h> int find(int *a,int start,int end) { if(start<end) { if(a[start]<a[end]) { cout<<"1st Arrys condition"<<a[start]<<" "<<a[end]<<endl; return find(a,start+1,end); } else cout<<"2nd Arrys condition"<<a[start]<<" "<<a[end]<<endl; return find(a,start,end-1); } cout<<"Last= "<<a[end]<<endl; } void main() { clrscr(); const int size=8; int arr[size]={7,6,13,12,2,9,5,99}; for(int i=0;i<size;i++) …

Member Avatar for payara111
0
170

The End.