I just came up with this code.. but it doesnt work from the 3rd line onwards.. :-(
Code:
#include<stdio.h>
void partition(int no);
int main()
{
   int n=4;

   partition(n);

}

void partition(int no)
{
   int j=0;
   int i;
   for(i=no; i>=1; i--)
   {
        printf(" %d , %d  \n", no-j, no-i);
        j++;
   }
}
~
~

Last edited by coderzone; 2Sep2007 at 10:40..