Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.3 kB
3
Indexable
Never
#include <stdio.h>
#include<windows.h>

void gotoxy(int x, int y)
{
  static HANDLE h = NULL;
  if(!h)
    h = GetStdHandle(STD_OUTPUT_HANDLE);
  COORD c = { x, y };
  SetConsoleCursorPosition(h,c);
}

int main()
{


    int i=5,time=1000;
        int x1=5,y1=5,len=8;




    ///S
        for(i= 0 ;i< 8;i++){
            gotoxy(x1+i,y1);
            printf("s");
            Sleep(100);

            gotoxy(10+i,10+i);
            printf(" ");
            Sleep(100);
        }
        x1=5;y1=6;
        for(i= 0 ;i< 4;i++){
            gotoxy(x1,y1+i);
            printf("S");

            gotoxy(10+i,10+i);
            printf(" ");
            Sleep(100);
        }
        x1=5,y1=10;

        for(i= 0 ;i< 8;i++){
            gotoxy(x1+i,y1);
            printf("S");

            gotoxy(10+i,10+i);
            printf(" ");
            Sleep(100);
        }
        x1=12;y1=10;
        for(i= 0 ;i< 5;i++){
            gotoxy(x1,y1+i);
            printf("S");

            gotoxy(10+i,10+i);
            printf(" ");
            Sleep(100);
        }

        x1=5,y1=15;
        for(i=0;i<8;i++){
            gotoxy(x1+i,y1);
            printf("S");

            gotoxy(10+i,10+i);
            printf(" ");
            Sleep(100);
        }
}