Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int main()
  5. {
  6. int w,max=0,placer=0;
  7. cout<<"podaj wielkosc tablicy"<<endl;
  8. cin>>w;
  9. int T[w];
  10. cout <<endl<<"wproadz zawartosc tablicy"<<endl;
  11. for(int v=0;v<w;v++){
  12. cin>>T[v];
  13. cout<<endl<<"wprowadz zawartosc tablicy"
  14. }
  15. max = T[0];
  16. for(int i=1;i<w,i++){
  17. if(T[i]>max)
  18. max=T[i];
  19. }
  20. cout<<endl<<"najwieksza liczba to:"<<max;
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement