搜索
查看: 247|回复: 0
打印 上一主题 下一主题

求告知为什么运行画面一片空白什么都没有。。。没有出现字符A

[复制链接]
跳转到指定楼层
楼主
 楼主| 发表于 2020-10-5 22:27:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
5啊哈币
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <conio.h>
  4. #include <windows.h>
  5. int main()
  6. {
  7.     int plane_x,plane_y;
  8.     int enemy_x,enemy_y;
  9.     int zidan_x,zidan_y;
  10.     int bottom,right;
  11.     int x,y,a,b;
  12.     char zifu;
  13.     void startup()//初始化
  14.     {
  15.         plane_x=10;
  16.         plane_y=10;
  17.         right=80;
  18.         bottom=40;
  19.     }
  20.     while(666)//游戏循环
  21.     {
  22.         void show()//显示画面
  23.         {
  24.             system("cls");
  25.             for(b=0;b<=bottom;b++)
  26.             {
  27.                 for(a=0;a<=right;a++)
  28.                 {
  29.                    if((a==plane_x)&&(b==plane_y))
  30.                    printf("A");
  31.                    else
  32.                    printf(" ");
  33.                 }
  34.                 printf("");
  35.                 Sleep(100);
  36.                 system("pause");
  37.             }
  38.         }
  39.         void updatewithoutinput()
  40.         {
  41.             
  42.         }
  43.         void updatewithinput()
  44.         {
  45.             zifu=getch();
  46.             if(zifu=='w'&&plane_y>0)
  47.             plane_y--;
  48.         }
  49.     }
  50.        system("pause");
  51.         return 0;
  52. }






复制代码

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

广播台
特别关注
快速回复 返回顶部 返回列表