Angel David Yaguana Hernandez
/
CPP_cstdlib_stdlib
stdlib
Revision 0:3aa31e7fe98c, committed 2012-04-03
- Comitter:
- sherckuith
- Date:
- Tue Apr 03 21:00:05 2012 +0000
- Commit message:
- descripcion y ejemplo
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /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; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Apr 03 21:00:05 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/737756e0b479