Advertisement
InnaSibirova

zalupa

Jan 10th, 2022
962
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3.  
  4. int main()
  5. {
  6.     int n = 30, proizv = 1, g = 30;;
  7.     for(int i = 0; i < n; i++) {
  8.         for(int j = 0; j < n; j++) {
  9.             if(i == j) {
  10.                 printf("%d ", n-i);
  11.                 proizv = proizv * (n-i);
  12.                
  13.             }
  14.             else {
  15.                 printf("%d ", 0);
  16.             }
  17.         }
  18.         printf("\n");
  19.     }
  20.     printf("%d", proizv);
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement