A simple Algorithem

Sep 4 2008 11:18 AM

Hello...!

I need to develop a algorithem..here is the question.

A partition of a positive integer n is a sequence of positive integers that sum to n.Write an algorithem in pseudocode and then implement the algorithem(in C)to print all non-increasing partitions of n.

eg:- if n = 4

4

3   1

2   2

2   1   1

1   1   1   1

This is an Urgent thing.So if you can please help me to do this.(Remember everything should be done using C language).I need both Algorithem and the coding.

Thanks...

Charith