hi, am hassan, neeed soln pls 4 this exs by recursive fns method,
this is the soln by non recursive :
#include<iostream.h>
#include<conio.h>
int is_ascending(int [],int);
int main()
{
clrscr();
int a[3],n=3;
cout<<"Enter the 3 elements of the array";
for(int i=0;i<n;i++)
cin>>a[i];
cout<<is_ascending(a,n);
getch();
return 0;
}
int is_ascending(int a[3],int n)
{
for(int i=0;i<n;i++)
if(a[i]>a[i+1])
return 0;
else
return 1;
}
i need it by recursive pls..
bye
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
