Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- void losuj(double tablica [][10])
- {
- srand(time(nullptr));
- for (int a = 0; a<10 ; a++)
- {
- for (int b = 0; b<10; b++)
- {
- tablica[a][b] = 10.0 * (rand() - 1)/(RAND_MAX - 1);
- }
- }
- }
- void wypisz(double tablica[][10])
- {
- for(int i = 0; i < 10; ++i)
- {
- for(int j = 0; j < 10; ++j)
- cout << tablica[i][j] << '\t';
- cout << endl;
- }
- }
- int main ()
- {
- double tablica[10][10];
- losuj(tablica);
- wypisz(tablica);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment