⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 logic.c

📁 Many C samples. It is a good sample for students to learn C language.
💻 C
字号:
/* Bai tap 1_86 - Tro choi Logic */
#include <conio.h>
#include <dos.h>
#include <string.h>
#include <stdlib.h>
#include<stdio.h>
int day[7] = {-1,-1,-1,-1,-1,-1,-1};
int sonhap[4];
int somay[4];
int solanthu;
int timthay;

void khoitao()
{
  char tieude[] = "L O G I C    G A M E";
  int j, i, dich;
  textmode(C40);
  clrscr();
  textcolor(YELLOW);
  dich = (40 - strlen(tieude)) / 2;
  for (i=strlen(tieude)-1; i>=0; i--)
  {
    movetext(1,3,39,3,2,3);
    gotoxy(1,3);
    putch(tieude[i]);
    delay(40);
  }
  for (i=1; i<=dich; i++)
  {
    movetext(1,3,39,3,2,3);
    gotoxy(1,3);
    putch(' ');
    delay(40);
  }
  randomize();
  for (i=0; i<4; i++)
  {
    do {
      j = random(6)+1;
    } while (day[j] != -1);
    day[j] = i;
    somay[i] = j;
   // printf ("%d",&j);
  }
  gotoxy(14,5);         cprintf("赏屯屯脱屯屯屯

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -