title: How to make a variable equal to a string of other variables in C
body: <p>This is the full code, the dig variables are user inputs</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
    int main()
  {
      int num;
      int dig1=0;
      int dig2=0;
      int dig3=0;
      num=dig1,dig2,dig3;
      fflush(stdin);
      printf("Please enter the first digit of your three digit number:");
      scanf("%d", &amp;dig1);
      fflush(stdin);
      printf("Please enter the second digit of your three digit number:");
      scanf("%d", &amp;dig2);
      fflush(stdin);
      printf("Please enter the third digit of your three digit number:");
      scanf("%d", &amp;dig3);
  
      if (num==(dig1*dig1*dig1)+(dig2*dig2*dig2)+(dig3*dig3*dig3))
      {
          printf("Your number is an Armstrong number!\n");
      }
      else
      {
          printf("Your number is not an Armstrong number!\n");
      }
  
      system("pause");
      return 0;
  }
  </code></pre>
  
  <p>How could I make the variable "num" equal to all of the inputs for "dig1", "dig2", and "dig3". As in if dig 1 was 2 and dig 2 was 4 and dig 3 was 6, num would be 246. Please help!</p>