nice

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Red_Nova_Six
Date:
Tue Sep 25 23:44:42 2018 +0000
Commit message:
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 7090d77d07d8 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Sep 25 23:44:42 2018 +0000
@@ -0,0 +1,36 @@
+#include "mbed.h"
+
+
+int main() 
+{
+  
+  Timer t;
+  t.start();
+  float x;
+  float y;
+  int counter;
+  
+  printf("Please Enter a number between \r \n ");
+  scanf("%f", &x);
+  srand(t.read_ms());
+  
+  for (counter=1; counter <= 10000; counter ++ )
+  {
+  y = float(1 + rand()%100);
+  printf("%f \r \n",y);
+  
+  if (x <= y)
+  {
+    printf ("%f = %f", y,x);
+    break ;
+
+  }
+  }
+  
+  
+  
+  
+  
+  
+  
+}
diff -r 000000000000 -r 7090d77d07d8 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Sep 25 23:44:42 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/e95d10626187
\ No newline at end of file