djvj icon

Untitled

djvj | PRO | 10/26/15 01:06:43 AM UTC | 0 ⭐ | 529 👁️ | Never ⏰ | []
C++ |

320 B

|

None

|

0 👍

/

0 👎

#include "stdafx.h"
#include <iostream>
 
 
int main()
{
    int b = 2;
    double result;
    for (int e = 1; e < 10; e++)
    {
        result = pow(b, e);
        std::cout << result << "\n";        // prints result to console and a new line
    }
    std::cout << "Press Enter to continue";
    std::getchar();                 // wait for enter to be pressed
}

Comments