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 min;
- min = tab[1];
- for (i=1 ; i<=n ; i++)
- if (min>tab[i])
- min=tab[i];
- cout<<"najmniejszy element to " << min;
- system("PAUSE");
- return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement