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