Hi, just as I thought I had a grasp on for/while loops, my C++ teacher thoroughly confused me.
We can only use #include <iostream.h>, no stdio.h or anything like that. So sticking to cout instead of printf. But anyway, what the program needs to do is very basic. I thought I got it, but now I'm confused. We need to use some loops (for loops I guess). It just confuses me... blech. I should have paid more attention.
Anyway the output should look like this, according to the teacher :
What number do you want the powers of? 3
how many powers of 3 do you want? 4
The first 4 powers of 3 are:
3^0 = 1
3^1 = 3
3^2 = 9
3^3 = 27
that's really simple, but coding it I don't know
Thanks in advance for any enlightenment..
-RSI
We can only use #include <iostream.h>, no stdio.h or anything like that. So sticking to cout instead of printf. But anyway, what the program needs to do is very basic. I thought I got it, but now I'm confused. We need to use some loops (for loops I guess). It just confuses me... blech. I should have paid more attention.
Anyway the output should look like this, according to the teacher :
What number do you want the powers of? 3
how many powers of 3 do you want? 4
The first 4 powers of 3 are:
3^0 = 1
3^1 = 3
3^2 = 9
3^3 = 27
that's really simple, but coding it I don't know
Thanks in advance for any enlightenment..
-RSI