| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2182 人关注过本帖
标题:飞机图形,大神帮忙给出最佳答案
取消只看楼主 加入收藏
网络小白
Rank: 2
等 级:论坛游民
帖 子:26
专家分:35
注 册:2014-9-13
结帖率:77.78%
收藏
已结贴  问题点数:20 回复次数:0 
飞机图形,大神帮忙给出最佳答案
[附件]我自己用了100多行代码才写出来。。。。如果用printf函数输出我感觉有点太。。。。。求大神给出完美答案
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
    int a, b,c,d,e,f;
    for (a = 0; a < 1; a++)
    {
        for (b = 0; b < 32; b++)
        {
            if (b == 11)
            {
                printf("*");
                printf("\n");
            }
            if (b == 22 || b == 25)
            {
                printf("*");
            }
            else
            {
                printf(" ");
            }

        }
   
    }
    printf("\n");

    for (c = 0; c < 1; c++)
    {
        for (d = 0; d < 21; d++)
        {
            if (d == 1 || d == 9 || d == 13 || d == 15)
            {
                printf("*");
               
            }
            else
            {
                printf(" ");
            }
            
        }
    }
    printf("\n");
    for (e = 0; e < 1;e++)
    {
        for (f = 0; f < 21;f++)
        {
            if (f == 1 || f == 2 || f == 8 || f == 12 || f == 14 || f == 16)
            {
                printf("*");
            }
            else
            {
                printf(" ");
            }
        }
    }
    printf("\n");
    printf(" *****   * * * * * * *");
    printf("\n");
    for (e = 0; e < 1;e++)
    {
        for (f = 0; f < 21;f++)
        {
            if (f == 1 || f == 2 || f == 8 || f == 12 || f == 14 || f == 16)
            {
                printf("*");
            }
            else
            {
                printf(" ");
            }
        }
    }
    printf("\n");
    for (c = 0; c < 1; c++)
    {
        for (d = 0; d < 21; d++)
        {
            if (d == 1 || d == 9 || d == 13 || d == 15)
            {
                printf("*");

            }
            else
            {
                printf(" ");
            }

        }
    }
    printf("\n");
    for (a = 0; a < 1; a++)
    {
        for (b = 0; b < 32; b++)
        {
            
            if (b == 11 || b == 14)
            {
                printf("*");
            }
            else
            {
                printf(" ");
            }

        }

    }
    printf("\n");
    for (a = 0; a < 1; a++)
    {
        for (b = 0; b < 32; b++)
        {

            if (b == 11)
            {
                printf("*");
            }
            else
            {
                printf(" ");
            }

        }

    }
    system("color 27");
    system("pause");
    return 0;
}


不好意思不知道怎么传图片。这是我自己写的代码,刚学C语言,同学都是用printf打的。我感觉这图形没什么规律。想问下有什么好的方法更简单点吗??谢谢

[此贴子已经被作者于2016-5-23 13:17编辑过]

搜索更多相关主题的帖子: include 
2016-05-22 20:48
快速回复:飞机图形,大神帮忙给出最佳答案
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.022339 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved