write a program to display the following series of number as 100 ,97,94,,91...,4,1.
QGP:
Which Programming Language do you want it in?
Answers
Answered by
2
Answer:
If we take a look at this problem carefully, we can see that the idea of “loop” is to track some counter value e.g. “i=0” till “i <= 100". So if we aren't allowed to use loop, how else can be track something in C language!
Well, one possibility is the use of ‘recursion’ provided we use the terminating condition carefully. Here is a solution that prints numbers using recursion.
Explanation:
Attachments:
Similar questions