title: Learning C and trying to make program that finds all sums of squares but I can't figure out the last part
body: <p>I'm creating a program that takes a number as input and the program finds the sums of squares, right now if I enter the number 5, it returns 4 + 1. The current program only displays solutions that are unique combinations of squares and I'm trying to get it to recognize and display all possible solutions.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  main()
  
  {
    int i,j,number;
    printf("Enter a number: ");
    scanf("%d",&amp;number);
    i=1;
    while (i*i &lt;= number)
      {
        j=1;
        while (j&lt;i)
          {
            if (i*i + j*j == number)
              printf("Found: %d + %d\n",i*i,j*j);
            j++;
          }
        i=i+1;
      }
  
    return (0);
  
  }
  </code></pre>