Question

Give a recursive definition for the set of all integers greater than 5 and are multiples...

Give a recursive definition for the set of all integers greater than 5 and are multiples of 3.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include <iostream>

using namespace std;
void print(int n){
// if n is less than 5 than return
if(n<5)
return;
//checking if it is mulitple of 5 than print it
if(n%3==0)
cout<<n<<" ";
//decreaing the n
print(n-1);
}
int main()
{
print(100);

return 0;
}

Note : Please comment below if you have concerns. I am here to help you

If you like my answer please rate and help me it is very Imp for me

Add a comment
Know the answer?
Add Answer to:
Give a recursive definition for the set of all integers greater than 5 and are multiples...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT