Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- using namespace std;
- int main(){
- vector <int> a;
- int n, count = 1;
- cout << "Введите количество элементов массива: ";
- cin >> n;
- for(int i=0;i<n;i++){
- int temp;
- cin >> temp;
- if(temp > 0 && temp < 10){
- count*=temp;
- }
- a.push_back(temp);
- }
- cout << "Полученный массив: ";
- for(int i=0;i<n;i++){
- cout << a[i] << " ";
- }
- cout << "Произвездение чисел попадающих в интервал [0;10]: " << count << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment