搜索
查看: 990|回复: 1
打印 上一主题 下一主题

【第二章第3节】动手试一试 题解

[复制链接]
跳转到指定楼层
楼主
发表于 2014-4-21 13:25:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  1. #include <stdio.h>
  2. #include <stdlib.h>

  3. int main()
  4. {
  5.         system("color 27");
  6.         printf("      *\n");
  7.         printf("      **\n");
  8.         printf("*     ***\n");
  9.         printf("**    ****\n");
  10.         printf("**************\n");
  11.         printf("**    ****\n");
  12.         printf("*     ***\n");
  13.         printf("      **\n");
  14.         printf("      *\n");
  15.                
  16.         system("pause");

  17.         return 0;
  18. }
复制代码
沙发
 楼主| 发表于 2014-4-21 13:27:34 | 只看该作者
  1. #include <stdio.h>
  2. #include <stdlib.h>

  3. int main()
  4. {
  5.         system("color 74");
  6.         printf("A\n");
  7.         printf("I*\n");
  8.         printf("I**\n");
  9.         printf("I***\n");
  10.         printf("I****\n");
  11.         printf("I*****\n");
  12.         printf("I\n");
  13.         printf("I\n");
  14.         printf("I\n");
  15.         printf("I\n");
  16.                
  17.         system("pause");

  18.         return 0;
  19. }
复制代码


再次说明,按照color命令自带的解释,7为白色,f为亮白色
如果觉得7的颜色偏灰可以改成f
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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