Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void myFunction( int counter)
- {
- if(counter == 2)
- return;
- else
- {
- //cout <<counter<<endl;
- //printf(" %d ", counter);
- myFunction(--counter);
- printf(" %d ", counter);
- return;
- }
- }
- int main(){
- myFunction(5);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement