回复 9楼 梦回唐朝
哈哈。希望我们都能突飞猛进
抱歉,你说的三角形我不会,直角三角形就会点。你看看吧
#include <stdio.h>
int main()
{
//最简单的方法,别见怪。嘿嘿
printf(" A\n");
printf(" BAB\n");
printf(" CBABC\n");
printf(" DCBABCD\n");
printf(" EDCBABCDE\n");
//////////////////////////////////
char ch[26]={'A','B','C','D','E','F','G','H',
'I','J','K','L','N','M','O','P','Q',
'R','S','T','U','V','W','X','Y','Z'
};
for (int x=0;x<20;x++)
{
printf("%c",ch[x]);
for (int y=0;y<x;y++)
{
printf("%c",ch[x]);
printf("%c",ch[y]);
}
printf("\n");
}
return 0;
}