2、编写一个C程序,运行时输出以下图形:(提交源程序及结果图) ***** ***** ***** *****
时间: 2023-11-25 10:50:38 浏览: 26
以下是C语言程序,可以输出所需的图形:
```c
#include <stdio.h>
int main() {
printf("*****\n");
printf(" *****\n");
printf(" *****\n");
printf(" *****\n");
return 0;
}
```
输出结果为:
```
*****
*****
*****
*****
```
相关问题
2、编写一个C程序,运行时输出以下图形:(提交源程序及结果图) ***** *****
以下是C语言程序,可以输出所需的图形:
```c
#include <stdio.h>
int main() {
printf("***** *****\n"); printf("***** *****\n");
return 0;
}
```
输出结果为:
```
***** *****
***** *****
```
2、编写一个C程序,运行时输出以下图形:(提交源程序及结果图) ***** ***** ***** *****
以下是C语言程序,可以输出题目要求的图形:
```c
#include <stdio.h>
int main()
{
int i, j;
for (i = 1; i <= 4; i++) {
for (j = 1; j <= i - 1; j++) {
printf(" ");
}
printf("*****\n");
}
return 0;
}
```
输出结果为:
```
*****
*****
*****
*****
```
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![.zip](https://img-home.csdnimg.cn/images/20210720083646.png)
![.zip](https://img-home.csdnimg.cn/images/20210720083646.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_lunwen.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_lunwen.png)
![-](https://csdnimg.cn/download_wenku/file_type_lunwen.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)