魔兽大主宰升级:求助!!!一道c的小题~~~

来源:百度文库 编辑:高校问答 时间:2024/04/30 23:18:21
打印下列图形(用循环)
# # # # #
# # # #
# # #
# #
#

#include <stdio.h>
main()
{int i=0,j=0;
for(j=5;j>0;j--)
{
for(i=j;i>0;i--)printf("#");
printf("\n");
}
}

在EXCEL中用拖放。

#include <stdio.h>
main()
{
printf("#####\n");
printf("####\n");
printf("###\n");
printf("##\n");
printf("#\n");

}