Advertisement
anon20016

5

Dec 12th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <vector>
  3. #include <iostream>
  4. #include <string>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. int n = 3;
  11. int m = 3;
  12. int p = 1;
  13. int a[5][5];
  14. for (int i = 0; i < n; i++) {
  15. for (int j = 0; j < m; j++) {
  16. cin >> a[i][j];
  17. if (j < i) {
  18. p = p * a[i][j];
  19. }
  20. }
  21. }
  22. cout << p;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement