Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2012
750
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.  
  8.     double alpha[50];
  9.     int counter = 0;
  10.  
  11.     for(int i = 0; i < 25; i++) {
  12.  
  13.         alpha[i] = pow(i, 2);
  14.     }
  15.  
  16.     for( int i = 25; i < 50; i++) {
  17.  
  18.         alpha[i] = i * 3;
  19.  
  20.     }
  21.  
  22.     for (int i = 0; i < 50; i++) {
  23.         if(counter >= 10) {
  24.             cout << endl;
  25.             counter = 0;
  26.         } else {
  27.             cout << alpha[i] << " ";
  28.         }
  29.  
  30.         counter++;
  31.     }
  32.  
  33.  
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement