Advertisement
Guest User

Untitled

a guest
Sep 30th, 2014
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. using namespace std;
  4. void main()
  5. {
  6.   system("cls");
  7.   setlocale(LC_ALL,"Rus");
  8.   int d[12], el=0;
  9.   for (int i=0; i<12; i++)
  10.   {
  11.       cout<<"Введите d["<<i<<"]=";
  12.       cin>>d[i];
  13.   }
  14.   cout<<"\nВведеный  массив: ";
  15.  for (int i=0; i<12; i++)
  16.   {
  17.       cout<<" "<<d[i];
  18.       if (i%2==0 && d[i]%3==0)
  19.       {
  20.           el++;
  21.           cout<<"< ";
  22.  
  23.       }
  24.   }
  25.   cout<<"\nКоличество элементов: "<<el<<endl;
  26.   system("pause");
  27.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement