Chad Lewellyn / Mbed 2 deprecated es202_Lab2

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
chadlewellyn
Date:
Tue Feb 02 05:54:11 2016 +0000
Commit message:
Lab2 part 1

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
diff -r 000000000000 -r b67098769236 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Feb 02 05:54:11 2016 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+ 
+int main () {
+    
+    int i = 0;                            // inicialize variables
+    int n = 0;
+    printf("Enter an integer value\n");   // 
+    scanf("%d", &n);
+    
+   if(n > 1) {                            // if number is bigger than one
+       for(i=0; i <= n; i++) {            // counts down from that number
+           printf("%d", &i);
+         }             
+      }
+    else {
+        printf("ERROR\n");                // if not prints error
+        }
+    }
\ No newline at end of file
diff -r 000000000000 -r b67098769236 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Feb 02 05:54:11 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6f327212ef96
\ No newline at end of file