simpe recursiv function

simpe recursiv function - cout<<counter<<endl...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include<iostream.h> void Fun( int counter) { if(counter == 0) return; // or exit(0); else
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { cout <<counter<<endl; counter --; Fun(counter); } } void main() { Fun(3); }...
View Full Document

This note was uploaded on 10/16/2010 for the course ENG 2266e taught by Professor Aliraqi during the Spring '10 term at 4.1.

Ask a homework question - tutors are online