Advertisement
killdaclick

Untitled

Nov 17th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. std::vector<int> wektor; // zalozmy ze ma ilestam losowych wartosci od zera do +nieskonczonosci
  2.  
  3. int min = -1;
  4. for(int i; i<wektor.size(); ++i)
  5. {
  6. if(wektor[i] < min)
  7. min = wektor[i];
  8. }
  9.  
  10. // po wykonaniu tej petli zmienna min zawiera minimalna wartosc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement