这里是输出一个菱形的两种方法 for循环输出菱形 #include<stdio.h> int main() { int i,j,k; for(i=0;i<3;i++) //上半部分行数 { for(j=0;j<2-i;j++) //先输入空格 { printf(" "); } for(k=