Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <windows.h>
  4.  
  5. using namespace std;
  6.  
  7. void gotoxy ( int x, int y)
  8. {
  9. COORD coord;
  10. coord.X = x;
  11. coord.Y = y;
  12. SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
  13. }
  14. int main(int argc, char** argv)
  15. {
  16. for (int i=0;i<=20;i++)
  17. {
  18. gotoxy (i,i);
  19. cout<<"*"<<"\n";
  20. }
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement