Initial version
Fork of Task137 by
main.cpp
- Committer:
- noutram
- Date:
- 2019-09-11
- Revision:
- 2:f9e74411371b
- Parent:
- 0:6fc3498f36e2
File content as of revision 2:f9e74411371b:
#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);
}
