论坛交流
首页办公自动化| 网页制作| 平面设计| 动画制作| 数据库开发| 程序设计| 全部视频教程
应用视频: Windows | Word2007 | Excel2007 | PowerPoint2007 | Dreamweaver 8 | Fireworks 8 | Flash 8 | Photoshop cs | CorelDraw 12
编程视频: C语言视频教程 | HTML | Div+Css布局 | Javascript | Access数据库 | Asp | Sql Server数据库Asp.net  | Flash AS
当前位置 > 文字教程 > C语言程序设计教程
Tag:新手,函数,指针,数据类型,对象,Turbo,入门,运算符,数组,结构,二级,,tc,游戏,试题,问答,编译,视频教程

几个游戏代码(彩票)

文章类别:C语言程序设计 | 发表日期:2008-9-24 14:46:57

这是天宇软件公司“上海黑暗之龙”原发表在本站论坛上的文章,现在一并发在这里。

1、彩票系统
/*天宇软件

彩票原代码

作者:上海黑暗之龙
2002/11/10
*/
main()
{ long int z[13][3],temp=0,k=0,a,b,c,d,d0,d1,d2,d3,d4,d5,d6,d7,d8,****;
  int x,y,x1=0,y1=0;
  printf("****************************************************************************\n");
  printf("*                                                                          *\n");
  printf("*               朱杰的彩票查询系统         *\n");
  printf("*          程序设计:朱杰         *\n");
  printf("****************************************************************************\n");
  for(x=0;x<13;x++)
    for(y=0;y<3;y++)
    {
        printf("\n请输入第%d行,第%d个数据",x,y);
        scanf("%ld",&k);
        z[x][y]=k;
    }
  printf("\n");
  printf("请再输入你认为比较小的参数:");
  scanf("%ld",&****);
  for(a=0;a<3;a++)
     { temp=0;
       temp=z[0][a];
       printf("%10d",temp);
       getch();
       for(d0=0;d0<3;d0++)
       { 
          if(d0==1)
          {
              temp=temp-z[11][2];
              temp=temp-z[10][2];
              temp=temp-z[9][2];
              temp=temp-z[8][2];
              temp=temp-z[7][2];
              temp=temp-z[6][2];
              temp=temp-z[5][2];
              temp=temp-z[4][2];
              temp=temp-z[3][2];
              temp=temp-z[2][2];
              temp=temp-z[1][d0-1];
           }
           if(d0==2)
           {
               temp=temp-z[11][2];
               temp=temp-z[10][2];
               temp=temp-z[9][2];
               temp=temp-z[8][2];
               temp=temp-z[7][2];
               temp=temp-z[6][2];
               temp=temp-z[5][2];
               temp=temp-z[4][2];
               temp=temp-z[3][2];
               temp=temp-z[2][2];
               temp=temp-z[1][d0-1];
            }
            temp=temp+z[1][d0];
            for(d1=0;d1<3;d1++)
            { if(d1==1)
              {
                 temp=temp-z[11][2];
                 temp=temp-z[10][2];
                 temp=temp-z[9][2];
                 temp=temp-z[8][2];
                 temp=temp-z[7][2];
                 temp=temp-z[6][2];
                 temp=temp-z[5][2];
                 temp=temp-z[4][2];
                 temp=temp-z[3][2];
                 temp=temp-z[2][d1-1];
              }
              if(d1==2)
              {
                 temp=temp-z[11][2];
                 temp=temp-z[10][2];
                 temp=temp-z[9][2];
                 temp=temp-z[8][2];
                 temp=temp-z[7][2];
                 temp=temp-z[6][2];
                 temp=temp-z[5][2];
                 temp=temp-z[4][2];
                 temp=temp-z[3][2];
                 temp=temp-z[2][d1-1];
              }
              temp=temp+z[2][d1];
              for(d2=0;d2<3;d2++)
              { if(d2==1)
                {
                   temp=temp-z[11][2];
                   temp=temp-z[10][2];
                   temp=temp-z[9][2];
                   temp=temp-z[8][2];
                   temp=temp-z[7][2];
                   temp=temp-z[6][2];
                   temp=temp-z[5][2];
                   temp=temp-z[4][2];
                   temp=temp-z[3][d2-1];
                 }
                 if(d2==2)
                 {
                    temp=temp-z[11][2];
                    temp=temp-z[10][2];
                    temp=temp-z[9][2];
                    temp=temp-z[8][2];
                    temp=temp-z[7][2];
                    temp=temp-z[6][2];
                    temp=temp-z[5][2];
                    temp=temp-z[4][2];
                    temp=temp-z[3][d2-1];
                 }
                 temp=temp+z[3][d2];
                 for(d3=0;d3<3;d3++)
                 { if(d3==1)
                   {
                      temp=temp-z[11][2];
                      temp=temp-z[10][2];
                      temp=temp-z[9][2];
                      temp=temp-z[8][2];
                      temp=temp-z[7][2];
                      temp=temp-z[6][2];
                      temp=temp-z[5][2];
                      temp=temp-z[4][d3-1];
                   }
                   if(d3==2)
                   {
                      temp=temp-z[11][2];
                      temp=temp-z[10][2];
                      temp=temp-z[9][2];
                      temp=temp-z[8][2];
                      temp=temp-z[7][2];
                      temp=temp-z[6][2];
                      temp=temp-z[5][2];
                      temp=temp-z[4][d3-1];
                   }
                   temp=temp+z[4][d3];
                   for(d4=0;d4<3;d4++)
                   { if(d4==1)
                     {
                        temp=temp-z[11][2];
                        temp=temp-z[10][2];
                        temp=temp-z[9][2];
                        temp=temp-z[8][2];
                        temp=temp-z[7][2];
                        temp=temp-z[6][2];
                        temp=temp-z[5][d4-1];
                     }
                     if(d4==2)
                     {
                         temp=temp-z[11][2];
                         temp=temp-z[10][2];
                         temp=temp-z[9][2];
                         temp=temp-z[8][2];
                         temp=temp-z[7][2];
                         temp=temp-z[6][2];
                         temp=temp-z[5][d4-1];
                      }
                      temp=temp+z[5][d4];
                      for(d5=0;d5<3;d5++)
                      { if(d5==1)
                        {
                            temp=temp-z[11][2];
                            temp=temp-z[10][2];
                            temp=temp-z[9][2];
                            temp=temp-z[8][2];
                            temp=temp-z[7][2];
                            temp=temp-z[6][d5-1];
                         }
                         if(d5==2)
                         {
                             temp=temp-z[11][2];
                             temp=temp-z[10][2];
                             temp=temp-z[9][2];
                             temp=temp-z[8][2];
                             temp=temp-z[7][2];
                             temp=temp-z[6][d5-1];
                         }
                         temp=temp+z[6][d5];
                         for(d6=0;d6<3;d6++)
                         { if(d6==1)
                           {
                               temp=temp-z[11][2];
                               temp=temp-z[10][2];
                               temp=temp-z[9][2];
                               temp=temp-z[8][2];
                               temp=temp-z[7][d6-1];
                            }
                            if(d6==2)
                            {
                               temp=temp-z[11][2];
                               temp=temp-z[10][2];
                               temp=temp-z[9][2];
                               temp=temp-z[8][2];
                               temp=temp-z[7][d6-1];
                            }
                            temp=temp+z[7][d6];
                            for(d7=0;d7<3;d7++)
                            { if(d7==1)
                              {
                                 temp=temp-z[11][2];
                                 temp=temp-z[10][2];
                                 temp=temp-z[9][2];
                                 temp=temp-z[8][d7-1];
                               }
                               if(d7==2)
                               {
                                  temp=temp-z[11][2];
                                  temp=temp-z[10][2];
                                  temp=temp-z[9][2];
                                  temp=temp-z[8][d7-1];
                                }
                                temp=temp+z[8][d7];
                                for(d8=0;d8<3;d8++)
                                { if(d8==1)
                                  {
                                      temp=temp-z[11][2];
                                      temp=temp-z[10][2];
                                      temp=temp-z[9][d8-1];
                                   }
                                   if(d8==2)
                                   {  temp=temp-z[11][2];
                                      temp=temp-z[10][2];
                                      temp=temp-z[9][d8-1];
                                   }
                                   temp=temp+z[9][d8];
                                   for(b=0;b<3;b++)
                                   { if(b==1)
                                     { 
                                         temp=temp-z[11][2];
                                         temp=temp-z[10][b-1];
                                      }
                                      if(b==2)
                                      {
                                         temp=temp-z[11][2];
                                         temp=temp-z[10][b-1];
                                      }
                                      temp=temp+z[10][b];
                                      for(c=0;c<3;c++)
                                      { if(c==1)
                                        temp=temp-z[11][c-1];
                                        if(c==2)
                                            temp=temp-z[11][c-1];
                                        temp=temp+z[11][c];
                                        for(d=0;d<3;d++)
                                        {
                                            temp=temp+z[12][d];
                                            if(****>=temp)
                                            {
                                               printf("z=%d",temp);
                                               printf("相关行列:%d,%d,%d,%d,%d,%d,%d,%d,%d,
                                        %d,%d,%d,%",a,d0,d1,d2,d3,d4,d5,d6,d7,d8,b,c,d);}
                                              /*getch();*/
                                               if(d==0)
                                                   temp=temp-z[12][d];
                                               if(d==1)
                                                   temp=temp-z[12][d];
                                                if(d==2)
                                                   temp=temp-z[12][d];

                                            }

                                         }
                                    }
                                }
                              }
                            }
                         }
                     }
                 }
            }
       }                
    }
  }                        
  getch();

}

上一篇:{应用}超级玛利原代码 人气:6520
下一篇:{应用}几个游戏代码(麻将原代码) 人气:4864
视频教程列表
文章教程搜索
 
C语言程序设计推荐教程
C语言程序设计热门教程
看全部视频教程
购买方式/价格
购买视频教程: 咨询客服
tel:15972130058