Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- int main(int argc, char *argv[])
- {
- cout<<"podaj wielkość tablicy";
- int n,i;
- cin>>n;
- int tab[n];
- cout<<"podaj "<<n<<"elementow tablicy"<<endl;
- for (i=1 ; i<=n ; i++){
- cin>> tab[i];
- cout<<endl;}
- int max,;
- max = 0;
- for (i=1 ; i<=n ; i++)
- if (max<tab[i])
- max=tab[i];
- cout<<"najwiekszy element to " << max;
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement