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.
Fork of Task137 by
Diff: main.cpp
- Revision:
- 0:6fc3498f36e2
- Child:
- 2:f9e74411371b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Sep 29 11:25:21 2015 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+
+Serial pc(SERIAL_TX, SERIAL_RX);
+
+char nameStr[30]; // array of chars (string)
+int age; // integer to hold your age
+
+void getData()
+{
+ pc.scanf("%s %d", &nameStr, &age);
+}
+
+int main()
+{
+ getData();
+
+ pc.printf("Hello %s \n\r", nameStr);
+ pc.printf("You are %d \n", age);
+}
\ No newline at end of file
