From a27d29d81c36d78401223aa79d5cebc271794278 Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Thu, 14 Feb 2019 21:39:29 +0000 Subject: Add lecture example --- ee1301/wk2/coolHipExample.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ee1301/wk2/coolHipExample.cpp (limited to 'ee1301/wk2/coolHipExample.cpp') 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 +#include +#include +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 -- cgit v1.2.3