[求助]问个关于*号的问题
请问如何输出 ***
***
****这样的*号 左对齐 行数由键盘输入
去看书.
一个简单的
#include <stdio.h>
#include <string.h>
main()
{
int Row=0,TheRow=0;
int TheI;
scanf("%d",&Row);
for(TheI = 0;TheI<=Row;TheI++)
{
for(TheRow=0;TheRow<=TheI;TheRow++)
{
printf("%s","*");
}
printf("\n");
}
getch();
}
#include <stdio.h>
void main()
{
int num,i,j;
printf("请输入行数\n");
scanf("%d",&num);
for(i=0;i<=num;i++)
{for(j=0;j<i;j++)
printf("*");
printf("\n");
}
}