Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int liczba, m=0, l;
  8.  
  9. cout << "Podaj ile liczb chcesz podac: ";
  10. cin >> l;
  11.  
  12. for(int i=0; i<l; i++)
  13. {
  14. cin>>liczba;
  15. if(liczba>m) m=liczba;
  16. }
  17.  
  18. cout << "Najwieksza liczba to: " << m;
  19.  
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement