diff options
author | RossTheRoss <msattr@gmail.com> | 2019-02-14 21:39:29 +0000 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2019-02-14 21:39:29 +0000 |
commit | a27d29d81c36d78401223aa79d5cebc271794278 (patch) | |
tree | 87ad4b5ea1050986a14a7bf8508894851d60ae88 /ee1301 | |
parent | Simplify things (diff) | |
download | homework-a27d29d81c36d78401223aa79d5cebc271794278.tar homework-a27d29d81c36d78401223aa79d5cebc271794278.tar.gz homework-a27d29d81c36d78401223aa79d5cebc271794278.tar.bz2 homework-a27d29d81c36d78401223aa79d5cebc271794278.tar.lz homework-a27d29d81c36d78401223aa79d5cebc271794278.tar.xz homework-a27d29d81c36d78401223aa79d5cebc271794278.tar.zst homework-a27d29d81c36d78401223aa79d5cebc271794278.zip |
Add lecture example
Diffstat (limited to '')
-rw-r--r-- | ee1301/wk2/coolHipExample.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ee1301/wk2/coolHipExample.cpp b/ee1301/wk2/coolHipExample.cpp new file mode 100644 index 0000000..e86f1b7 --- /dev/null +++ b/ee1301/wk2/coolHipExample.cpp @@ -0,0 +1,14 @@ +#include <iostream> +#include <iomanip> +#include <cmath> +using namespace std; + +int main () { + int x=2,n=0; + int og=x; + for (int i=n; i>1; i--){ + x*=og; + } + + cout << og << "^" << n << "=" << x << endl; +}
\ No newline at end of file |