Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <time.h>
- using namespace std;
- void wyswietl(int tablica[],int r){
- r=10;
- cout << "Wprowadone elementy tablicy: " << endl;
- for (int i=0; i<r; i++){
- cout << tablica[i] << endl;
- }
- }
- int main()
- {
- int a=5;
- int b=100;
- int tablica[10];
- srand(time(NULL));
- for(int i=0; i<10; i++){
- tablica[i]=a+rand()%(b-a+1);
- }
- cout << "Wylosowano liczby" << endl << endl;
- wyswietl(tablica,a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement