Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <time.h>
- using namespace std;
- string mapa[15];
- void wypelnij(string* mapa, unsigned szerokosc, unsigned wysokosc)
- {
- for(unsigned y=0; y<wysokosc; ++y)
- {
- for(unsigned x=0; x<szerokosc; ++x)
- {
- char znak = rand()% 3+33;
- mapa[y] += znak;
- }
- }
- }
- void narysuj(string* mapa, unsigned wysokosc)
- {
- for(unsigned i=0; i<wysokosc; ++i)
- cout << mapa[i] << endl;
- }
- int main()
- {
- srand(time(NULL));
- wypelnij(mapa, 15, 15);
- narysuj(mapa, 15);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement