Advertisement
cd62131

Power

Feb 24th, 2014
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. #define N 5
  3. int main(void) {
  4.   int beki[N][N], i, j, k, tmp;
  5.   for (i = 0; i < N; i++) {
  6.     for (j = 0; j < N; j++) {
  7.       tmp = i + 1;
  8.       for (k = 0; k < j; k++) {
  9.         tmp *= i + 1;
  10.       }
  11.       beki[i][j] = tmp;
  12.     }
  13.   }
  14.   for (i = 0; i < N; i++) {
  15.     for (j = 0 ; j < N; j++) {
  16.       printf("% 5d ", beki[i][j]);
  17.     }
  18.     puts("");
  19.   }
  20.   return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement