title: Learning Objective-C and I'm having problems with this snippet of code: (scanf)
body: <p>I'm learning Objective-C and I'm having problems with this snippet of code: (<code>scanf</code>)</p>
  
  <pre><code>int main (int argc, const char * argv[])
  {
      @autoreleasepool {
  
          double xnumber;
  
          scanf("%1f",&amp;xnumber);
  
          printf("%f",xnumber);
      }
      return 0;
  }
  </code></pre>
  
  <p>When I run this simple program, I cannot set the value of <code>xnumber</code> to anything. It alway returns zero no matter what I typed. This basic program it is just an input needed for many exercises... Can someone help me?</p>