/*
#include <turboc.h>
int main(){
gotoxy(37,12); //turboc.h 헤더파일에 포함된
printf("Center");
gotoxy(0,24);
return 0;
}
*/
/*
#include <turboc.h>
int main(){
int x,y;
int i;
textcolor(9); //색을 이렇게 사용 해도 된다.
printf("blue\n");
textcolor(RED);
printf("red\n");
//system("color FC"); //cmd창에서 색 넣기
while(1){
textcolor(baserand(0,15));
x = baserand(0,79);
y = baserand(0,24);
gotoxy(x,y);
printf("%c",baserand('0','9'));
Sleep(10); //점차 출력
}
return 0;
}
*/
/*
#include <turboc.h>
int main(){
int i;
int y;
system("mode con cols=70 lines=70");
while(1){
y = baserand(0,15);
for(i=0;i<65;i++){
gotoxy(i,y); //오른쪽으로 이동
printf("바보");
Sleep(30); //0.1초씩 멈추었다가
printf("\b\b\b\b ");
}
for(i=65;i>0;i--){
gotoxy(i,y);
printf("바보");
Sleep(30);
printf("\b\b\b\b ");
}
}
return 0;
}
*/
/*
#include <turboc.h>
int main(){ //별떨어지는거
int y;
int x;
while(1){
x = baserand(0,40);
for(y=0;y<15;y++){
textcolor(baserand(1,15));
gotoxy(x,y);
printf("☆");
Sleep(70);
gotoxy(x,y);
printf("★");
}
for(y=0;y<15;y++){
gotoxy(x,y);
printf(" ");
}
}
return 0;
}
*/
/*
#include <turboc.h> //색 Reverse 방법
int main(){
int i,j;
int tmp;
int A[16];
for(i=0;i<16;i++){
A[i] = 16 *i;
}
while(1){
gotoxy(0,0);
for(j=0;j<4;j++){
for(i=0;i<16;i++){
textcolor(A[i]);
printf(" ");
}
}
printf("\n");
for(j=0;j<4;j++){
for(i=15;i>=0;i--){
textcolor(A[i]);
printf(" ");
}
}
tmp = A[0];
for(i=0;i<15;i++){
A[i] = A[i+1];
}
A[15] = tmp;
Sleep(70);
}
printf("\n");
return 0;
}
*/
/*
#include <turboc.h> //별떨어지기 구조체를 사용
#define MAX 10
struct star{
int x,y;
int Speed;
int tmp;
int Color;
};
int main(){
int i,j;
struct star ST[MAX];
for(i=0;i<MAX;i++){
ST[i].x = baserand(0,50);
ST[i].y = baserand(0,15);
ST[i].Speed = baserand(0,10);
ST[i].tmp = ST[i].Speed;
ST[i].Color = baserand(1,15);
}
while(1){
gotoxy(0,0);
for(i=0;i<MAX;i++){
gotoxy(ST[i].x,ST[i].y);
textcolor(ST[i].Color);
printf("★");
}
Sleep(10);
for(i=0;i<MAX;i++){
if(--ST[i].Speed ==0){
gotoxy(ST[i].x,ST[i].y);
printf(" ");
ST[i].y++;
if(ST[i].y == 16){
ST[i].y = 0;
ST[i].x = baserand(0,50);
}
ST[i].Speed = ST[i].tmp;
}
}
}
return 0;
}
*/
/*