Bertie Harte
/
CAQuestion6
make public
main.cpp@0:c21bfc9b3a35, 2021-03-26 (annotated)
- Committer:
- BertieHarte
- Date:
- Fri Mar 26 10:20:29 2021 +0000
- Revision:
- 0:c21bfc9b3a35
make public
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
BertieHarte | 0:c21bfc9b3a35 | 1 | #include "mbed.h" // add "." to tell compiler that it requires a .h file. |
BertieHarte | 0:c21bfc9b3a35 | 2 | int a = 10; // add semi-colon |
BertieHarte | 0:c21bfc9b3a35 | 3 | int b = 20; // use lower case b as line 7 call the lower case. |
BertieHarte | 0:c21bfc9b3a35 | 4 | int main() { |
BertieHarte | 0:c21bfc9b3a35 | 5 | int c = a + b; // add semi-colon |
BertieHarte | 0:c21bfc9b3a35 | 6 | printf("the final answer = %d\n", c); |
BertieHarte | 0:c21bfc9b3a35 | 7 | } |
BertieHarte | 0:c21bfc9b3a35 | 8 | |
BertieHarte | 0:c21bfc9b3a35 | 9 | |
BertieHarte | 0:c21bfc9b3a35 | 10 |