Advertisement
CFHeadphase

Untitled

Jun 4th, 2018
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #define SQMAX 500
  4.  
  5. using std::cout;
  6. using std::endl;
  7.  
  8. int main(void){
  9.     int count = 0;
  10.     int output;
  11.    
  12.     while (output <= SQMAX) {
  13.         count++;
  14.         output = pow(count, 2);
  15.         cout << output << endl;
  16.     }
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement