Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- int x,i=0;
- cin>>x;
- double arr[x];
- for(int i; i<x;i++){
- cout<<"arr["<<i<<"]:"<<endl;
- cin>>arr[i];
- }
- double sum;
- for(int j;j<x;j++){
- if(arr[j]>= 0){
- sum*=arr[j];
- }
- }
- cout<<sum;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement