<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/index.php?action=history&amp;feed=atom&amp;title=CSC_216_F09%2FRecursion_Exercise</id>
	<title>CSC 216 F09/Recursion Exercise - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/index.php?action=history&amp;feed=atom&amp;title=CSC_216_F09%2FRecursion_Exercise"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216_F09/Recursion_Exercise&amp;action=history"/>
	<updated>2026-05-07T08:58:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216_F09/Recursion_Exercise&amp;diff=28055&amp;oldid=prev</id>
		<title>Sjlouder at 04:37, 18 November 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC_216_F09/Recursion_Exercise&amp;diff=28055&amp;oldid=prev"/>
		<updated>2009-11-18T04:37:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Background==&lt;br /&gt;
This is a simple exercise for finding recursive equations and writing them as Java code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Props===&lt;br /&gt;
1. Whiteboard&lt;br /&gt;
&lt;br /&gt;
2. Access to a Java editor&lt;br /&gt;
&lt;br /&gt;
===Procedure===&lt;br /&gt;
&lt;br /&gt;
1) Give each row a sequence of numbers. &lt;br /&gt;
&lt;br /&gt;
Ex:&lt;br /&gt;
&lt;br /&gt;
	a) 2, 6, 10, 14,...&lt;br /&gt;
&lt;br /&gt;
	b) 0, 1, 0, 1...&lt;br /&gt;
&lt;br /&gt;
	c) 2, 6, 12, 20...&lt;br /&gt;
&lt;br /&gt;
	d) 1, 4, 9, 16...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Then have each row work together to find the recursive definition for the sequences.&lt;br /&gt;
&lt;br /&gt;
Ex:&lt;br /&gt;
&lt;br /&gt;
	a) 4n-2&lt;br /&gt;
&lt;br /&gt;
	b) 1+(-1)^n&lt;br /&gt;
&lt;br /&gt;
	c) n(n + 1)&lt;br /&gt;
&lt;br /&gt;
	d) n^2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3) Lastly, each group should write Java code to implement the recursive equation and submit via Google Docs.  &lt;br /&gt;
&lt;br /&gt;
Ex:&lt;br /&gt;
&lt;br /&gt;
a) &lt;br /&gt;
&lt;br /&gt;
public int recursion( int n ){&lt;br /&gt;
    int a = 0;&lt;br /&gt;
    if(n == 1) a = 2;&lt;br /&gt;
    else a = recursion( n - 1 ) + 4;&lt;br /&gt;
    return a;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
By: David Duran &amp;amp; Dereck Allred&lt;/div&gt;</summary>
		<author><name>Sjlouder</name></author>
	</entry>
</feed>