title: Basic I/O in C — Program Chooses Random Int Rather Than Asking User
body: <p>I am very new to C programming, trying to adjust going from Python to C where the I/O syntax is very different. I would like to ask the user to enter two integers, then return to the user the two integers they had entered followed by the two integers multiplied together. My code follows:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(void) {
  
      int a,b,c;
      printf("Enter a: \n");
      scanf("%d", &amp;a);
      printf("Enter b: \n");
      scanf("%d", &amp;b);
  
      c = a*b;
      printf("a = %d, b = %d, a*b = %d", a,b,c);
      return 0;
  }
  </code></pre>
  
  <p>The program does not allow the user to input a value, but rather chooses its own seemingly random integer, and the multiplication is also not correct. My output is as follows:</p>
  
  <pre><code>Enter a: 
  Enter b: 
  a = 2665720, b = -2147319336, a*b = -76879552
  </code></pre>