#include <stdio.h>
#include<math.h>
#include <time.h>
#include <windows.h>
gotoxy(int x, int y)
{
COORD pos = {x, y};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
int main(void)
{
int a[3],b[3],i,c=100,d=100,e,f,sum=0;
srand(time(NULL));
gotoxy(39,25);
printf("청팀카드 ");
gotoxy(38,3);
printf("백팀카드 ");
gotoxy(80,25);
printf("남은돈 ");
printf("%d만원",c);
gotoxy(80,3);
printf("남은돈 ");
printf("%d만원 ",d);
gotoxy(80,5);
printf("얼마를 내시겠습니까?");
printf("\n\n");
gotoxy(80,23);
printf("얼마를 내시겠습니까?");
gotoxy(89,20);
printf("만원");
gotoxy(89,8);
printf("만원");
gotoxy(50,25);
for(i=1; i<=3; i++)
{
a[i]=rand()%10;
printf("%d ",a[i]);
}
gotoxy(50,3);
for(i=1; i<=3; i++)
{
b[i]=rand()%10;
printf("%d ",b[i]);
}
gotoxy(84,20);
scanf("%d",&f);
gotoxy(84,8);
scanf("%d",&f);
gotoxy(84,15);
printf("합계 ");
sum=f+e;
printf("%d",sum);
sleep(100);
return 0;
}