求助啊,谁有有趣的c语言小程序,并且要有源代码!!

作者&投稿:漕娣 (若有异议请与网页底部的电邮联系)
求C语言大佬编一个小程序,急!感激不尽!是一个有趣的文件搜索引擎~

搜索引擎分类部分提到过全文搜索引擎从网站提取信息建立网页数据库的概念。搜索引擎的自动信息搜集功能分两种。一种是定期搜索,即每隔一段时间(比如Google一般是28天),搜索引擎主动派出“蜘蛛”程序,对一定IP地址范围内的互联网网站进行检索,一旦发现新的网站,它会自动提取网站的信息和网址加入自己的数据库。另一种是提交网站搜索,即网站拥有者主动向搜索引擎提交网址,它在一定时间内(2天到数月不等)定向向你的网站派出“蜘蛛”程序,扫描你的网站并将有关信息存入数据库,以备用户查询。随着搜索引擎索引规则发生很大变化,主动提交网址并不保证你的网站能进入搜索引擎数据库,最好的办法是多获得一些外部链接,让搜索引擎有更多机会找到你并自动将你的网站收录。
蜘蛛搜索引擎
当用户以关键词查找信息时,搜索引擎会在数据库中进行搜寻,如果找到与用户要求内容相符的网站,便采用特殊的算法——通常根据网页中关键词的匹配程度、出现的位置、频次、链接质量——计算出各网页的相关度及排名等级,然后根据关联度高低,按顺序将这些网页链接返回给用户。这种引擎的特点是搜全率比较高。

单独学c很枯燥的,会把你的兴趣搞没的,建议你搞一门脚本语言,以及win的API,学会调用API

学习“推箱子”C语言编码:

#include <stdio.h>

#include <conio.h>

#include<stdlib.h>

#include<windows.h>

int m =0;  //m代表第几关

struct maps{short a[9][11]; };

struct maps map[5]={ 0,0,0,0,0,0,0,0,0,0,0,  //共5关,每关9行

                  0,1,1,1,1,1,1,1,0,0,0,

                  0,1,0,0,0,0,0,1,1,1,0,

                  1,1,4,1,1,1,0,0,0,1,0,  //0空地,1墙

                  1,5,0,0,4,0,0,4,0,1,0,  //4是箱子,5是人

                  1,0,3,3,1,0,4,0,1,1,0,  //3是目的地

                  1,1,3,3,1,0,0,0,1,0,0,  //7是箱子在目的地(4+3)

                  0,1,1,1,1,1,1,1,1,0,0,  //8是人在目的地(5+3)

                  0,0,0,0,0,0,0,0,0,0,0,

                  0,0,0,0,0,0,0,0,0,0,0,

                  0,0,1,1,1,1,0,0,0,0,0,

                  0,0,1,5,0,1,1,1,0,0,0,

                  0,0,1,0,4,0,0,1,0,0,0,

                  0,1,1,1,0,1,0,1,1,0,0,

                  0,1,3,1,0,1,0,0,1,0,0,

                  0,1,3,4,0,0,1,0,1,0,0,

                  0,1,3,0,0,0,4,0,1,0,0,

                  0,1,1,1,1,1,1,1,1,0,0,

                  0,0,0,0,0,0,0,0,0,0,0,

                  0,0,0,1,1,1,1,1,1,1,0,

                  0,0,1,1,0,0,1,0,5,1,0,

                  0,0,1,0,0,0,1,0,0,1,0,

                  0,0,1,4,0,4,0,4,0,1,0,

                  0,0,1,0,4,1,1,0,0,1,0,

                  1,1,1,0,4,0,1,0,1,1,0,

                  1,3,3,3,3,3,0,0,1,0,0,

                  1,1,1,1,1,1,1,1,1,0,0,

                  0,1,1,1,1,1,1,1,1,1,0,

                  0,1,0,0,1,1,0,0,0,1,0,

                  0,1,0,0,0,4,0,0,0,1,0,

                  0,1,4,0,1,1,1,0,4,1,0,

                  0,1,0,1,3,3,3,1,0,1,0,

                  1,1,0,1,3,3,3,1,0,1,1,

                  1,0,4,0,0,4,0,0,4,0,1,

                  1,0,0,0,0,0,1,0,5,0,1,

                  1,1,1,1,1,1,1,1,1,1,1,

                  0,0,0,0,0,0,0,0,0,0,0,

                  0,0,0,1,1,1,1,1,1,0,0,

                  0,1,1,1,0,0,0,0,1,0,0,

                  1,1,3,0,4,1,1,0,1,1,0,

                  1,3,3,4,0,4,0,0,5,1,0,

                  1,3,3,0,4,0,4,0,1,1,0,

                  1,1,1,1,1,1,0,0,1,0,0,

                  0,0,0,0,0,1,1,1,1,0,0,

                  0,0,0,0,0,0,0,0,0,0,0 };

void DrMap( )  //绘制地图

{ CONSOLE_CURSOR_INFO cursor_info={1,0};   //隐藏光标的设置

 SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);

 printf("

\b推箱子");

 printf("
");

for (int i = 0; i < 9; i++)

    {for (int j = 0; j < 11; j++)

       {switch (map[m].a[i][j])

          {case 0:  printf("  "); break;

           case 1:  printf("■"); break;

           case 3:  printf("◎");break;

           case 4:  printf("□"); break;

           case 5:  printf("♀"); break;   //5是人

           case 7:  printf("□"); break;  //4 + 3箱子在目的地中

           case 8:  printf("♀");break;   // 5 + 3人在目的地中

          }

       }

      printf("
");

   }

}

 

void gtxy(int x, int y)  //控制光标位置的函数

{ COORD coord;

 coord.X = x;

 coord.Y = y;

 SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);

}

 

void start( )  //开始游戏

{ int r, c;    //r,c用于记录人的下标

 for (int i = 0; i < 9; i++)

   { for (int j = 0; j < 11; j++)

       {if (map[m].a[i][j] == 5||map[m].a[i][j]==8) { r = i;  c = j; } } //i j 人的下标

   }

char key; 

 key = getch( );

 switch (key)

   {case 'W':

    case 'w':

    case 72:

      if (map[m]. a[r - 1][c] == 0|| map[m]. a [r - 1][c] == 3)

        { gtxy(2*c+8,r-1+3); printf("♀");   // gtxy(2*c+8,r-1+3)是到指定位置输出字符

          if(map[m]. a[r ][c] == 5){gtxy(2*c+8,r+3); printf("  "); }

         if(map[m]. a[r ][c] == 8){gtxy(2*c+8,r+3); printf("◎");}

         map[m]. a [r - 1][c] += 5;  map[m]. a [r][c] -= 5; }

      else  if (map[m]. a [r - 1][c] == 4 || map[m]. a [r - 1][c] == 7)

         { if (map[m]. a [r - 2][c] == 0 || map[m]. a [r - 2][c] == 3)

           { gtxy(2*c+8,r-2+3); printf("□"); gtxy(2*c+8,r-1+3); printf("♀");

             if(map[m]. a[r ][c] == 5){gtxy(2*c+8,r+3); printf("  "); }

             if(map[m]. a[r ][c] == 8){gtxy(2*c+8,r+3); printf("◎");}

             map[m]. a [r - 2][c] += 4;  map[m]. a [r - 1][c] += 1;

             map[m]. a [r][c] -= 5; }

        } break;

    case 'S':

    case 's':

    case 80:

        if (map[m]. a [r + 1][c] == 0 || map[m]. a [r + 1][c] == 3)

         { gtxy(2*c+8,r+1+3); printf("♀");

           if(map[m]. a[r ][c] == 5){gtxy(2*c+8,r+3); printf("  "); }

          if(map[m]. a[r ][c] == 8){gtxy(2*c+8,r+3); printf("◎");}

          map[m]. a [r + 1][c] += 5;  map[m]. a [r][c] -= 5; }

       else if (map[m]. a [r + 1][c] == 4 || map[m]. a [r+ 1][c] == 7)

           { if (map[m]. a [r + 2][c] == 0 || map[m]. a [r + 2][c] == 3)

             { gtxy(2*c+8,r+2+3); printf("□"); gtxy(2*c+8,r+1+3); printf("♀");

               if(map[m]. a[r ][c] == 5){gtxy(2*c+8,r+3); printf("  "); }

              if(map[m]. a[r ][c] == 8){gtxy(2*c+8,r+3); printf("◎");}

              map[m]. a [r + 2][c] += 4; map[m]. a [r + 1][c] += 1;

             map[m]. a [r][c] -= 5; }

          }break;

    case 'A':

    case 'a':

    case 75:

        if (map[m]. a [r ][c - 1] == 0 || map[m]. a [r ][c - 1] == 3)

          { gtxy(2*(c-1)+8,r+3); printf("♀");

           if(map[m]. a[r ][c] == 5){gtxy(2*c+8,r+3); printf("  "); }

          if(map[m]. a[r ][c] == 8){gtxy(2*c+8,r+3); printf("◎");}

           map[m]. a [r ][c - 1] += 5; map[m]. a [r][c] -= 5; }

       else if (map[m]. a [r][c - 1] == 4 || map[m]. a [r][c - 1] == 7)

          {if (map[m]. a [r ][c - 2] == 0 || map[m]. a [r ][c - 2] == 3)

            { gtxy(2*(c-2)+8,r+3); printf("□"); gtxy(2*(c-1)+8,r+3); printf("♀");

              if(map[m]. a[r ][c] == 5){gtxy(2*c+8,r+3); printf("  "); }

              if(map[m]. a[r ][c] == 8){gtxy(2*c+8,r+3); printf("◎");}

              map[m]. a [r ][c - 2] += 4; map[m]. a [r ][c - 1] += 1;

              map[m]. a [r][c] -= 5; }

         }break;

    case 'D':

    case 'd':

    case 77:

        if (map[m]. a [r][c + 1] == 0 || map[m]. a [r][c + 1] == 3)

         { gtxy(2*(c+1)+8,r+3); printf("♀");

           if(map[m]. a[r ][c] == 5){gtxy(2*c+8,r+3); printf("  "); }

           if(map[m]. a[r ][c] == 8) {gtxy(2*c+8,r+3); printf("◎");}

          map[m]. a [r][c + 1] += 5;  map[m]. a [r][c] -= 5; }

      else if (map[m]. a [r][c + 1] == 4 || map[m]. a [r][c + 1] == 7)

          { if (map[m]. a [r][c + 2] == 0 || map[m]. a [r][c + 2] == 3)

            { gtxy(2*(c+2)+8,r+3); printf("□"); gtxy(2*(c+1)+8,r+3); printf("♀");

              if(map[m]. a[r ][c] == 5){gtxy(2*c+8,r+3); printf("  "); }

             if(map[m]. a[r ][c] == 8){gtxy(2*c+8,r+3); printf("◎");}

             map[m]. a [r][c + 2] += 4; map[m]. a [r][c + 1] += 1;

             map[m]. a [r][c] -= 5; }

         }break;

    }

}

int ifwan( )  //是否完成(1是0否)

{ if(m==0){if(map[m].a[5][2]==7&& map[m].a[5][3]==7&&

                  map[m].a[6][2]==7&& map[m].a[6][3]==7) return 1;}

 if(m==1){if(map[m].a[5][2]==7&& map[m].a[6][2]==7&&

                  map[m].a[7][2]==7) return 1;}

 if(m==2){if(map[m].a[7][1]==7&& map[m].a[7][2]==7&& map[m].a[7][3]==7&&

                 map[m].a[7][4]==7&& map[m].a[7][5]==7) return 1;}

if(m==3){if(map[m].a[4][4]==7&& map[m].a[4][5]==7&& map[m].a[4][6]==7&&

        map[m].a[5][4]==7&& map[m].a[5][5]==7&& map[m].a[5][6]==7) return 1;}

if(m==4){if(map[m].a[3][2]==7&& map[m].a[4][1]==7&& map[m].a[4][2]==7&&

                map[m].a[5][1]==7&& map[m].a[5][2]==7) return 1;}

 return 0;

}

 

int main( )  //主函数

{ while (1)

     { system("cls");

       DrMap( );

       while (1)

           { start( );

             if(ifwan()){printf("\007");break;} //完成后响铃

          }

       m+=1;

    }

  return 0;

}



一个贪吃蛇C源代码,本人稍加优化,练手应当不错。
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <time.h>
#include <Windows.h>

#define WIDTH 78 //地图的宽,x轴
#define HEIGHT 26 //地图的高,y轴
int dire=3; //方向变量,初值为向“左”
int Flag=0; //判断是否吃了食物的标志
int score=0; //玩家得分

struct foods{ int x;
int y;
}food; //结构体food有2个成员
struct snakes{int len;
int speed;
int x[100];
int y[100];
}snake; //结构体snake有4个成员

void gotoxy( int x,int y) //获得句柄,才能控制光标移动
{ COORD coord;
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}

void gotoxy( int x,int y); //以下声明要用到的几个自编函数
void csh( );
void keyDown( );
void Move( );
void putFood( );
int pdOver( );

int main( ) //主函数
{ csh( );
while(1)
{ keyDown( );
Move( );
putFood( );
if(pdOver( ))
{system(“cls”);
gotoxy(WIDTH/2+1,HEIGHT/2);
printf(“游戏结束!T__T”);
gotoxy(WIDTH/2+1,HEIGHT/2+1);
printf(“玩家总分:%d分”,score);
getch( );
break; }
Sleep(snake.speed);
}
return 0;
}

void csh( ) //初始化界面
{ int i;
gotoxy(0,0);
CONSOLE_CURSOR_INFO cursor_info={1,0}; //光标值设为0就隐藏了
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);

for(i=0;i<=WIDTH;i=i+2) //横坐标要为偶数,因为这里要打印的字符占2个位置
{ gotoxy(i,0); //打印上边框
printf("■");
gotoxy(i,HEIGHT); //打印下边框
printf("■");
}
for(i=1;i<HEIGHT;i++)
{ gotoxy(0,i); //打印左边框
printf("■");
gotoxy(WIDTH,i); //打印右边框
printf("■");
}
while(1)
{ srand((unsigned int)time(NULL)); //设定种子为当前时间
food.x=rand()%(WIDTH-4)+2;
food.y=rand()%(HEIGHT-2)+1;
if(food.x%2==0)break;
}
gotoxy(food.x,food.y); //到食物坐标处打印初试食物
printf("●");

snake.len=3; //蛇身长
snake.speed=350; //刷新蛇的时间,即是移动速度
snake.x[0]=WIDTH/2+1; //蛇头横坐标为偶数
snake.y[0]=HEIGHT/2; //蛇头纵坐标
gotoxy(snake.x[0], snake.y[0]); //打印蛇头
printf("■");

for(i=1;i<snake.len;i++)
{ snake.x[i]=snake.x[i-1]+2;
snake.y[i]=snake.y[i-1];
gotoxy(snake.x[i],snake.y[i]); //打印蛇身
printf("■");
}
return;
}

void keyDown( ) //按键操作
{ int key;
if(kbhit( )) //如有按键输入才执行下面操作
{ key=getch( );
if(key==224) //值为224表示按下了方向键,下面要再次获取键值
{ key=getch( );
if(key==72&&dire!=2)dire=1; //72为向上
if(key==80&&dire!=1)dire=2; //80为向下
if(key==75&&dire!=4)dire=3; //75为向左
if(key==77&&dire!=3)dire=4; //77为向右
}
if(key==13)
{ while(1) if((key=getch( ))==13) break; } //13为回车键,这儿用来暂停
}
}

void Move( ) //蛇移动一节
{ if(Flag==0) //如没吃食物,才执行下面操作擦掉蛇尾
{ gotoxy(snake.x[snake.len-1],snake.y[snake.len-1]);
printf(" ");
}
int i;
for (i = snake.len - 1; i > 0; i--) //从蛇尾起每节存储前一节坐标值(蛇头除外)
{ snake.x[i]=snake.x[i-1];
snake.y[i]=snake.y[i-1];
}
switch (dire) //以下判断蛇头该往哪个方向移动,并获取最新坐标值
{ case 1: snake.y[0]--; break;
case 2: snake.y[0]++; break;
case 3: snake.x[0]-=2; break;
case 4: snake.x[0]+=2; break;
}
gotoxy(snake.x[0], snake.y[0]); //打印蛇头
printf("■");
if (snake.x[0] == food.x && snake.y[0] == food.y) //如吃到食物执行以下操作
{ snake.len++; score += 50; snake.speed -= 5; Flag = 1;}
else Flag = 0;
if(snake.speed<160) snake.speed= snake.speed+5; //作弊码,不让速度无限加快
}

void putFood( ) //投放食物
{ if(Flag == 1) //如吃到食物才执行以下操作,生成另一个食物
{ while (1)
{ int i,n= 1;
srand((unsigned int)time(NULL)); //设定当前时间,接下产生食物坐标值
food.x = rand( ) % (WIDTH - 4) + 2;
food.y = rand( ) % (HEIGHT - 2) + 1;
for (i = 0; i < snake.len; i++) //随机生成的食物不能在蛇的身体上
{ if (food.x == snake.x[i] &&food.y == snake.y[i])
{ n= 0; break;}
}
if (n && food.x % 2 == 0) break; //n不为0且横坐标为偶数,食物坐标取值成功
}
gotoxy(food.x, food.y); //光标到取得的坐标处打印食物
printf("●");
}
return;
}

int pdOver( ) //判断游戏是否结束
{ int i;
gotoxy(2,HEIGHT+1); //以下打印一些其它信息
printf(“暂停键:Enter.”);
gotoxy(2,HEIGHT+2);
printf(“游戏得分:%d”,score);
if (snake.x[0] == 0 || snake.x[0] == WIDTH) return 1; //蛇头触碰左右边界
if (snake.y[0] == 0 || snake.y[0] == HEIGHT) return 1; //蛇头触碰上下边界
for (i = 1; i < snake.len; i++)
{ if (snake.x[0] == snake.x[i] && snake.y[0] == snake.y[i]) return 1; } //蛇头触碰自身
return 0;
}

#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>

#define numOfQuestions 10

void main()
{
srand(1);
for(int i=0;i<numOfQuestions ;i++)
{
bool add = rand()%2;
char oper = '-';
if(add) oper = '+';
int a = rand()%100;
int b = rand()%100;
if(!add)
{
while(b>a)b = rand()%100;
}
printf("%d %c %d =?", a, oper, b);
int answer = 0;
scanf("%d", &answer);
bool correct = false;
if(add)
{
if(answer == (a + b)) correct = true;
}
else
{
if(answer == (a - b)) correct = true;
}
if(correct)printf("回答正确!\n");
else printf("回答错误!\n");

}
}




求助啊,谁有有趣的c语言小程序,并且要有源代码!!
void start( ) \/\/开始游戏 { int r, c; \/\/r,c用于记录人的下标

求几个比较有趣,简单的C语言源代码 小白自己敲着练一下手感
include<conio.h> include<windows.h> int m=0,s=0,ms=0; \/\/m是分 s是秒 ms是毫秒 \/\/以下是5个自编函数 void csh( ); \/\/初始化界面 void yinc(int x,int y); \/\/隐藏光标的函数(y值设为0就会隐藏)void jishi( ); \/\/计时器运行(每100毫秒变化一次)void Color (short x,...

有哪些简单有趣的c\/c++小程序
简单有趣的小程序有忆年共享相册、云梦助眠引导、番茄闹钟等。1. 忆年共享相册:忆年是一款为用户提供免费的照片存储及共享的应用软件。界面非常简洁,可点击底部按钮生成相册,原图照片都储存在云端,不过期,支持批量上传和下载。在微信中一键邀请分享,能够和亲朋好友共享照片。2. 云梦助眠引导:它是...

发现了一个有趣的c语言问题,请各位大神帮忙解释一下。
1.之所以再次编译值不改变,乃是因为系统在加载可执行镜像时所选取的栈的初始地址是相对固定的,a就在这个栈上,而且程序开始到main函数执行,这是一段按部就班的例程,没有什么变数,所以a的地址不变是可以理解的。2.scanf("%d",20000)这句合法并没有什么难以理解的地方,因为指针归根到底也只是一...

C语言有趣的printf
printf()也是一个函数,而且它需要的第一个参数是个字符指针,也就是说,printf()函数的的第一个参数可以是个字符指针,而不一定非要是一个字符串常量。知道这一点后就可以理解这个调用了:它等价于:char *p=(x%2)?("**%d"):("##%d\\n");printf(p,x);明白了吗,如果不明白,那么进一步等价...

哪位大侠精通c语言,推荐几个有趣的 实用的 c语言小程序
"我是猪")!=0){ printf("不说是吧?没关系,那就等着关机吧,哈哈哈哈!\\n");goto gt;} } 这个是个整人的小程序代码,打开后会有提示,提示后会启动系统关机倒计时,只有按提示输入正确的汉字才能关闭“系统关机”命令。本人初学者,自己调的,仅供参考。只做娱乐使用,注意保存修改过的文件。

C语言6个有趣的面试题
C语言6个有趣的面试题 1、gets()函数 问: 请找出下面代码里的问题。答:上面代码里的问题在于函数gets()的使用,这个函数从stdin接收一个字符串而不检查它所复制的缓存的容积,这可能会导致缓存溢出。这里推荐使用标准函数fgets()代替。2、main()的返回类型 问:下面的代码能编译通过吗? 如果能,它...

谁有一些有趣的脑筋急转弯?
6. 有一个字,人人见了都会念错。这是什么字?答案:这是“错”字。7. 小华在家里,和谁长得最像?答案:自己。8. 鸡蛋壳有什么用处?答案:用来包蛋清和蛋黄。9. 不必花力气打的东西是什么?答案:打哈欠。10. 你能做,我能做,大家都做;一个人能做,两个人不能一起做。这是做什么?

刚刚学了C语言,想写点程序,有什么好玩的呢?
一本学习教程,现在C语言教材多如牛毛,但推荐大家使用《C语言程序设计》谭浩强主编 第二版 清华大学出版社,此书编写的很适合初学者,并且内容也很精到。除此以外,现在有很多辅助学习的软件,毕竟现在是Window时代了,学习软件多如牛毛,不象我们当初学习,只有读书做题这么老套。我向大家推荐一个“集成...

用C语言编写下面介绍的程序。很有趣哦!
26].CodeStr, "\\n");printf("The zimu and morse:\\n");for( i = 0; i <=26; i ++ ){ printf("%c%s\\t",myMCode[i].letter, myMCode[i].CodeStr );} printf("\\n");printf("Please Input the word:\\n");gets(InputStr);printf("The morse and sound:\\n");i = 0;...

樊城区13022069099: 求助啊,谁有有趣的c语言小程序,并且要有源代码!! -
夕心血尿: #include#include#define numOfQuestions 10 void main() { srand(1); for(int i=0;ia)b = rand()%100; } printf("%d %c %d =?", a, oper, b); int answer = 0; scanf("%d", &answer); bool correct = false; if(add) { if(answer == (a + b)) correct = true; } ...

樊城区13022069099: 求助啊,谁有有趣的c语言小程序,并且要有源代码!!
夕心血尿: #include <stdlib.h>#include <stdio.h> #include <math.h>#include <time.h>#define numOfQuestions 10void main(){ srand(1); for(int i=0;i<numOfQuestions ;i++){ bool add = rand()%2; char oper = '-'; if(add) oper = '+'; int a = rand()%100; int b = rand()...

樊城区13022069099: 求有意思的经典C语言小程序 -
夕心血尿: /*汉诺塔C语言版: http://www.ivanblog.cn/post/hano-cpp.html*/ #include void hanoi(int n,char A,char B,char C) { if(n==1) { printf("Move disk %d from %c to %c\n",n,A,C); } else { hanoi(n-1,A,C,B); printf("Move disk %d from %c to %c\n",n,A,C); ...

樊城区13022069099: 谁有比较有趣的用C++写的小程序啊!有帮忙传两个啊,谢谢啊!简单点的啊,我是菜鸟! -
夕心血尿: #include <iostream> using namespace std; void Move(int a[] ,int n,int k) { int len=n-1;int i,j,temp=0;for(i=0;i<k;i++){temp=a[len];for(j=len;j>0;j--)a[j]=a[j-1];a[0]=temp;} } int main() {int a[100];int i,n,k;cin >> n;if(n<100){for(i=0;i<n;i++)cin...

樊城区13022069099: 谁有c语言一些运行起来结果很好玩的程序的代码.. -
夕心血尿: /*太大了估计你不想要,给你一个扫雷程序,turbo C下才能编译成功 空格:打标记 回车:扫雷 方向键:改变方向 */ #include #include #include void adjust(int*,int*); int a[23][23],c[22][22],mm,nn; int roundmine(int,int); void spread(); main() { int i,j,b[...

樊城区13022069099: c语言能写出什么样有意思的小程序? -
夕心血尿: #include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #define numOfQuestions 10 void main() { srand(1); for(int i=0;i<numOfQuestions ;i++) { bool add = rand()%2; char oper = '-'; if(add) oper = '+'; int a = rand()%100; int b = ...

樊城区13022069099: 谁有一些简单小游戏的C语言程序? -
夕心血尿: 可以学写“贪吃蛇”代码:#include <stdio.h>#include <stdlib.h>#include <conio.h>#include <time.h>#include <Windows.h>#define W 78 //游戏框的宽,x轴#define H 26 //游戏框的高,y轴 int dir=3; //方向变量,初值3表示向“左” int Flag=0; ...

樊城区13022069099: 急需一个C语言编译的有趣的程序 -
夕心血尿: 以前写的一个,测试时可以用2000作为测试数据: #include<stdio.h>#include<stdlib.h>#include<time.h>#include<windows.h> int main( int argc, char *argv[] ) { int i, j, k, n = 0, temp; char s[20][81];printf( "请输入数字雨落下的时间(单位:0.1秒...

樊城区13022069099: 很6很好玩的短小c语言程序! -
夕心血尿: 视频教程自己去学《C语言也能干大事》,超级玛丽,吃金币,飞机大战,网站开发

樊城区13022069099: 搞怪C语言小程序
夕心血尿: // 这个好办.VC里新建一个win32工程,把这段代码贴到WinMain所在的cpp //然后在资源视图里按照我发的图添加控件.主要是 //那个文本框的id要设置为IDC_INPUT //把原先的OK按钮的文字改成“确定” #include "stdafx.h" #include "...

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 星空见康网