Advertisement
djvj

Untitled

Oct 25th, 2015
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3.  
  4.  
  5. int main()
  6. {
  7.     int b = 2;
  8.     double result;
  9.     for (int e = 1; e < 10; e++)
  10.     {
  11.         result = pow(b, e);
  12.         std::cout << result << "\n";        // prints result to console and a new line
  13.     }
  14.     std::cout << "Press Enter to continue";
  15.     std::getchar();                 // wait for enter to be pressed
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement