Help w/ patterns &series?

Hi, I'd appreciate any help with the source code for following series/ patterns.


1.


A
C A
E C A
G E C A


2.

&
& &
& &
& &
&&&&&&&&&

3.

2 + 2 + 4³ + 2 + 4³ + 6^5 ...etc.


(sorry, couldn't find Alt-Code to raised-to-5)

Any help is greatly appreciated. :-)
I believe you're looking for recursion.
http://www.danzig.us/cpp/recursion.html

Also you don't actually have to use alt codes. There's convenient format buttons for every time you post something, and there just so happens to be superscript and subscript buttons.

An example of recursion pseudocode would go something like:
1
2
if x == 1, return some int
else function(x-1)
Topic archived. No new replies allowed.