用for循环打印倒三角形及菱形

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/12 13:58:00
用for循环打印倒三角形及菱形

用for循环打印倒三角形及菱形
用for循环打印倒三角形及菱形

用for循环打印倒三角形及菱形
#include
#include
#include
int main()
{
\x05int x,y,n;
\x05char type;
\x05printf("倒三角 --- 1\n");
\x05printf(" 菱形 --- 2\n");
\x05type=getch();
\x05printf("选择行数:");
\x05scanf("%d",&n);
\x05if(type=='1')
\x05\x05for(y=0;y