Home Progamming C++ Arrows running with cpp
formats

Arrows running with cpp

Published on 12/09/2008 by in Progamming C++

#include <stdio.h>
#include <conio.h>
#include <dos.h>

void main(void)
{
clrscr();
char x=0;
int speed=0;
do {
for(int i = 0; i<80;i++) {
delay(10-speed);
clrscr();
printf(“%d\n”,speed);
gotoxy(i,1);
printf(“>”);

}
for(int b=80;b>0;b-=1) {
delay(10-speed);
clrscr();
printf(“%d\n”,speed);
gotoxy(b,1);
printf(“<”);
}
clrscr();
x=getch();
/* if (speed<10){
if (x==43) {
speed +=1;
} else if (x==45) {
speed -=1;
}
} else
printf(“Speed Overflow”);
*/ }while (x!=27);
printf(“====== Stop Program ======”);
getch();
}

—————-
Now playing: Kelly Chen – A Love’s Concerto
via FoxyTunes

Related posts:

  1. Triangle Calculate
  2. Flag with turbo c++
  3. คติจากพี่แจ๊ก
  4. FireFox 2.0.0.13 ออกและ ไวโคตร
 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments