title: Decimal to hexadecimal converter
body: <p>I'm new into programmring, and i've got my first assignment. The assignment is about converting a decimal input to decimal AND hexadecimal.
  If i fx type 15 (input), i should get 15 and F as output.
  I am not to build the program from scratch. My teacher gave me a template in Atmel Studio (the template is called BasicIO, if i recall correctly).
  This is what I've done so far:</p>
  
  <pre><code>#define F_CPU 16000000UL
  
  #include &lt;stdio.h&gt;
  #include &lt;avr/io.h&gt;
  #include &lt;util/delay.h&gt;
  #include "usart.h"
  
  int main(void) {    
  
      uart_init(); // open the communication to the microcontroller
      io_redirect(); // redirect input and output to the uart
  
      int input=0;
  
      while(1) {
          printf("Input a number\n");
          scanf("%d %x", &amp;input, &amp;input);
          printf("You wrote %d\n", input);        
      }
  
      return 0;
  }
  </code></pre>
  
  <p>There are no errors when compiling the program, but i never get an understandable output, whenenver i type something in. Can anyone see the reason for that? What should i change?</p>
  
  <p>This is of course C programming, and i use Atmel Studio to make the program in, and run it in Realterm with an Arduino.</p>
  
  <p>PS: As i told, it was a template. The only things that I have added are the %d, %x, and the &amp;inputs, where i thought they belonged.</p>