Site hosted by Angelfire.com: Build your free website today!
« May 2006 »
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Entries by Topic
All topics  «
Blog Tools
Edit your Blog
Build a Blog
RSS Feed
View Profile
Open Community
Post to this Blog
You are not logged in. Log in
C++ Programs from Random Places
Tuesday, 16 May 2006
Intro to Recursion
//THIS PROGRAM IS SHORT AND SWEET. IT USES RECURSION TO REVERSE
//THE ORDER IN WHICH ITEMS ARE ENTERED
//**NOTE**: THIS IS NOT COPYRIGHTED MATERIAL AND IS FREE FOR PERSONAL
//USE AND DISTRIBUTION
#include

using namespace std;

void rev( )
{ char ch;
cin.get(ch);
if (ch != '\n')
{ rev();
cout.put(ch);
}
}

int main( )
{ rev();
}


Posted by poetry/maddoxtheconqueror at 12:01 AM CDT
Post Comment | Permalink | Share This Post

View Latest Entries