Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime>
- using namespace std;
- const int ROZMIAR{ 6 };
- void wypelni(int tab[]) {
- for (int i = 0; i < ROZMIAR; ++i) {
- tab[i] = rand() % 49 + 1;
- }
- }
- void wyswietl(int tab[]) {
- for (int i = 0; i < ROZMIAR; ++i) {
- cout << tab[i] << ' ';
- }
- cout << endl;
- }
- int main() {
- int tab[ROZMIAR];
- srand(time(nullptr));
- wypelni(tab);
- wyswietl(tab);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement