Advertisement
Guest User

Untitled

a guest
Jun 13th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. int f1(int n, int x)
  2. {
  3.  
  4.     int vekf1[50];
  5.     x = 0;
  6.     for (int i = 0; i < n;i++) //wektor leci po indeksach
  7.     {
  8.         if (i  % 2 == 0); //sprawdza czy parzyste
  9.         {
  10.             int z = vekf1[i];
  11.             if (0 > z)//sprawdza czy >0
  12.             {
  13.                 x++; //zlicza
  14.             }
  15.         }
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement