Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include<ctime>
- using namespace std;
- int main()
- {
- srand(time(NULL));
- int tab[10],min_;
- for (int i=0;i<10;i++)
- {
- tab[i]=rand()%50+1;
- cout << tab[i] << endl;
- }
- min_=tab[0];
- for (int i=0;i<10;i++)
- {
- if(min_>=tab[i])
- {
- min_=tab[i];
- }
- }
- cout << "minimum wynosi: " << min_;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement