gabe program 1
Dependencies: mbed
main.cpp@0:e088c7c39097, 2014-10-02 (annotated)
- Committer:
- KyleSchaff
- Date:
- Thu Oct 02 17:45:09 2014 +0000
- Revision:
- 0:e088c7c39097
gabe program 1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
KyleSchaff | 0:e088c7c39097 | 1 | #include "mbed.h" |
KyleSchaff | 0:e088c7c39097 | 2 | |
KyleSchaff | 0:e088c7c39097 | 3 | DigitalOut myled(LED1); |
KyleSchaff | 0:e088c7c39097 | 4 | |
KyleSchaff | 0:e088c7c39097 | 5 | int main() { |
KyleSchaff | 0:e088c7c39097 | 6 | int collins_number; |
KyleSchaff | 0:e088c7c39097 | 7 | int i; |
KyleSchaff | 0:e088c7c39097 | 8 | printf("Enter number please, Collins:"); |
KyleSchaff | 0:e088c7c39097 | 9 | scanf("%d\n\r",&collins_number); |
KyleSchaff | 0:e088c7c39097 | 10 | if(collins_number<100) |
KyleSchaff | 0:e088c7c39097 | 11 | { |
KyleSchaff | 0:e088c7c39097 | 12 | for(i=0;i<=collins_number;i++) |
KyleSchaff | 0:e088c7c39097 | 13 | printf("COLLINS IS NOT A BOSS\n\r"); |
KyleSchaff | 0:e088c7c39097 | 14 | } |
KyleSchaff | 0:e088c7c39097 | 15 | else |
KyleSchaff | 0:e088c7c39097 | 16 | for(i=0;i<=collins_number;i++) |
KyleSchaff | 0:e088c7c39097 | 17 | printf("COLLINS IS A BOSS\n\r"); |
KyleSchaff | 0:e088c7c39097 | 18 | } |