Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 0:b67098769236
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