title: A simple program using 6 digit number
body: <p>I want to make a program where you will be asked to give a six digit number. In the screen I would print the six single-digit numbers that were given, the average of those numbers, and the min and the max.</p>
  
  <p>The simplest way I thought of was to make an integer table. However, giving the 6 digit number causes the table to use spaces at each digit. Is there a simple way that I can write a 6 digit number without spaces, and do the same thing?</p>
  
  <p>Here is the code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;stdio.h&gt;
  #include &lt;cstdio&gt;
  using namespace std;
  int main() 
  {
      float numb[6], max, min;
      int i;
      float sum;
      float average;
  
      cout &lt;&lt; "Give a six digit number: ";
      for (i = 0; i &lt; 6; i++) {
          cin &gt;&gt; numb[i];
      }
  
      cout &lt;&lt; "The number you gave its :\n ";
      for (i = 0; i &lt; 6; i++) {
          printf("%f ,", numb[i]);
      }
  
      for (i = 0; i &lt; 6; i++) {
          sum = sum + numb[i];
      }
      average = sum / 6;    
      cout &lt;&lt; "Average is \n" &lt;&lt; average;
  
      max = numb[0];
      for (i = 0; i &lt; 6; i++) {
          if (max &lt; numb[i])
              max = numb[i];
      }
      printf("Largest element: %f", max);
  
      min = numb[0];
      for (i = 0; i &lt; 6; i++) {
          if (min &gt; numb[i])
              min = numb[i];
      }
      printf("Smallest element: %f", min);
  }
  </code></pre>