zqqqqz2000 发表于 2014-8-12 17:45:53

强烈支持楼主ing……

a19881111 发表于 2014-8-12 23:32:56

6666

HB无影 发表于 2014-8-14 21:20:46

强烈支持楼主ing……

Justdoit 发表于 2014-8-23 18:33:59

激动人心,无法言表!

zhangzhilin 发表于 2014-8-24 10:09:26

激动人心,无法言表!

ramber 发表于 2014-10-3 19:07:58

真是难得给力的帖子啊。

iOS_传说 发表于 2014-10-29 00:25:06

我是VIP,我骄傲!

1120815657 发表于 2014-11-23 20:21:00

强烈支持楼主ing……

213421 发表于 2014-11-23 22:49:09

强烈支持楼主ing……

271736888 发表于 2014-11-24 16:44:14

强烈支持楼主ing……

☆回到起點 发表于 2014-11-28 16:01:06

看看先

时光切手 发表于 2014-12-17 02:20:56

学习

醉红颜 发表于 2014-12-28 21:27:39

激动人心,无法言表!

lwwj888999 发表于 2014-12-30 06:02:31

楼主加油,鱼C加油!我们都看好你哦!

哼哼楠 发表于 2015-1-21 18:15:25

真是难得给力的帖子啊。

无情修罗 发表于 2015-3-10 17:13:25

不错

C语言菜鸟 发表于 2015-3-11 18:15:05

学习一下

温存° 发表于 2015-3-11 18:30:08

激动人心,无法言表!

weiqi7777 发表于 2015-3-11 20:45:24


#include"iostream"
#include"stdio.h"
using namespace std;
int main()
{
        char a;
        char b;
        int i=0;
        int k;
        int space = 1;

        cin >> a;
        while (a != '\0');
        i--;
        cout << "以下按照要求打印符号三角形" << endl;
        for (int j = 0; j < i; j++)
                cout << a<<' ';
        cout << endl;
        while (1)
        {
                k = 0;
                for (int j = 0; j < space; j++)
                        cout << ' ';
                for (int j = 1; j < i; j++)
                {
                        if (a == a)
                                b = '+';
                        else
                                b = '-';
                }
                for (int j = 0; j < k; j++)
                {
                        a = b;
                        cout << b<<' ';
                }
                i = k;
                space++;
                cout << endl;
                if (k == 0)
                        break;
        }
}

此地无银 发表于 2015-3-16 20:51:59

看看
页: 1 2 3 [4] 5 6 7 8 9
查看完整版本: 打印符号三角形(队列的应用)