Andy Pomfret
/
UoY-32C-lab1-1
Template project for University of York ELE00032C Lab 1
main.cpp@1:b2ac3acd4518, 2021-12-16 (annotated)
- Committer:
- ajp109
- Date:
- Thu Dec 16 16:16:18 2021 +0000
- Revision:
- 1:b2ac3acd4518
- Parent:
- 0:77209603a6fe
Pull updates for 2022
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ajp109 | 0:77209603a6fe | 1 | #include "mbed.h" |
ajp109 | 0:77209603a6fe | 2 | |
ajp109 | 0:77209603a6fe | 3 | int main() |
ajp109 | 0:77209603a6fe | 4 | { |
ajp109 | 0:77209603a6fe | 5 | int x = 4; |
ajp109 | 0:77209603a6fe | 6 | x = 6; |
ajp109 | 0:77209603a6fe | 7 | int y; |
ajp109 | 0:77209603a6fe | 8 | y = 2*x; |
ajp109 | 0:77209603a6fe | 9 | x = 7; |
ajp109 | 0:77209603a6fe | 10 | |
ajp109 | 0:77209603a6fe | 11 | printf("x:%d y:%d\n", x, y); |
ajp109 | 0:77209603a6fe | 12 | |
ajp109 | 0:77209603a6fe | 13 | // Do nothing, forever... |
ajp109 | 0:77209603a6fe | 14 | while (true); |
ajp109 | 0:77209603a6fe | 15 | } |