Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <windows.h>
- #include <ctime>
- #include <cstdlib>
- using namespace std;
- void postavi_kurzor(short x, short y) //funkcija se postavi na željeno vrstico in stolpec
- { HANDLE hStdout=GetStdHandle(STD_OUTPUT_HANDLE) ;
- COORD pozicija;
- pozicija.X=x; pozicija.Y=y;
- SetConsoleCursorPosition(hStdout, pozicija) ; }
- int main()
- {
- int stolp,vrst=0,i=1;
- srand(time(0));
- while (vrst < 25) {
- while(i <= 4) {
- stolp=rand()%81;
- postavi_kurzor(stolp,vrst);
- cout << "A" << endl;
- i++;
- }
- vrst++;
- i=1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement