diff options
Diffstat (limited to 'demo-input-int.c')
-rw-r--r-- | demo-input-int.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/demo-input-int.c b/demo-input-int.c new file mode 100644 index 0000000..aa1330d --- /dev/null +++ b/demo-input-int.c @@ -0,0 +1,17 @@ +#include "libmalice.h" + +int lmMain(void) +{ + int i; + + lmPrintString("This demo tests keyboard input for integers.\n"); + + lmPrintString("Enter a number and press return: "); + i = lmReadInt32s(); + lmPrintString("You entered the number "); + lmPrintInt32s(i); + lmPrintChar('.'); + lmPrintChar('\n'); + + return 0; +} |