Advertisement
immuntasir

Untitled

Sep 6th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. #include <stdio.h>
  2. int main() {
  3.     int numbers[5][7] = { {81, 87, 93, 97, 92, 87, 82},
  4.                         {83, 88, 94, 96, 91, 86, 81},
  5.                         {84, 89, 95, 95, 90, 85, 80},
  6.                         {85, 90, 96, 94, 89, 84, 81},
  7.                         {86, 91, 97, 93, 88, 83, 82} };
  8.     int i, j, sum;
  9.     for (i=0; i<7; i++) {
  10.         sum = 0;
  11.         for (j=0; j<5; j++) {
  12.             sum = sum+numbers[j][i];
  13.         }
  14.         printf("Summation of column %d = %d\n", i+1, sum);
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement