Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "rus");
- int n,i=0, j=0;
- cout<<"Введите количество переменных -> ";
- cin>>n;
- int* mas = new int[n];
- for (;i<n;i++)
- {
- cout<<"Введите число -> ";
- cin>>mas[i];
- if (mas[i] != 0 && mas[i] % 2 == 1)j++;
- }
- cout<<"Нечетных: "<<j<<'\n';
- delete[]mas;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement