stdlib

Dependencies:   mbed

Revision:
0:3aa31e7fe98c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Apr 03 21:00:05 2012 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+
+/* atoi example */
+#include <stdio.h>
+#include <stdlib.h>
+
+int main ()
+{
+  int i;
+  char szInput [256];
+  printf ("Enter a number: ");
+  fgets ( szInput,5, stdin );//char * fgets ( char * str, int num, FILE * stream );
+  i = atoi (szInput);
+  printf ("The value entered is %d. The double is %d.\n",i,i*2);
+  return 0;
+}