C语言实验——for循环打印图形(循环结构)
Time Limit: 1000 ms Memory Limit: 65536 KiB
Problem Description
通过使用双重for循环语句,打印下列图形:
Input
Output
Sample Input
Sample Output
* *** ***** ******* ***** *** *
#include<stdio.h>
int main()
{
int n;
int i;
int temp;
n = 4;
for(i = 1; i <= n; i++)//这里打印上半部分的图案
{ //i=1时打印第一行的星号
for(temp = i; temp < n; temp++)//打印第i

这是一篇关于C语言实验的博客,重点讲解如何利用双重for循环来打印特定图形。文章可能包含输入输出示例及问题描述。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



