Advertisement
Josif_tepe

Untitled

Mar 5th, 2021
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     int proizvod = 1;
  9.     cin >> n;
  10.     int niza[n];
  11.     for (int i = 0; i < n; i += 1)
  12.     {
  13.         cin >> niza[i];
  14.     }
  15.     for (int a = 0; a < n; a += 1)
  16.     {
  17.         proizvod *= niza[a];
  18.     }
  19.     cout << proizvod << endl;
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement