找大侠帮忙!有关C语言的题!!

来源:百度知道 编辑:UC知道 时间:2024/05/25 17:51:11
编程输出以下图形,行数及每行个数由用户输入决定
***************
***************
***************
***************
每一行***********前面都有不同长度的空格,
顺序是由上到下,空格越来越少
刚才打的时候没有输进去空格,不好意思~~~

#include "stdio.h"
void main()
{
printf("*************** ");
printf("*************** ");
}
需要输出多少行就加多少printf("*************** ")函数多少*可以自己选择

#include <stdio.h>
main()
{
int i,j,k,a,b;
printf("输入首行空格的个数:");
scanf("%d",&i);
printf("输入*的个数");
scanf("%d",&j);
printf("输入行数");
scanf("%d",&k);
for(a=0;a<k;a++)
{
for(b=0;b<i;b++)
printf(" ");
for(b=0;b<j;b++)
printf("*");
if(i>0)
i--;
printf("\n");
}
}

#include<stdio.h>
main()
{
int low,counts;
int temp1,temp2,temp3;
printf("shu ru hang shu he ge shu");
scanf("%d,%d",&low,&counts);
for(temp3=1;temp3<=low;temp3++)
{
for(temp1=1;temp1<=temp3;temp1++)