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.
Dependencies: mbed
Diff: main.cpp
- Revision:
- 2:77448d13dd0d
- Parent:
- 1:da458f1db225
- Child:
- 3:3395362f87b8
diff -r da458f1db225 -r 77448d13dd0d main.cpp --- a/main.cpp Fri Oct 19 04:09:07 2018 +0000 +++ b/main.cpp Fri Oct 19 04:20:20 2018 +0000 @@ -11,11 +11,16 @@ } double power(int x,int y) { - int z=x; + if (y>0) { + int z=x; + } else { + return 1 + } while(y>0) { z=z*x; y--; - }return z; + } + return z; } void display_vu(unsigned int x) {