int main()
{
int i, j, n;
//Reads number of rows to be printed from user
printf("Enter value of n : ");
scanf("%d", &n);
for(i=1; i<=n; i++)
{
for(j=i; j<=n; j++)
{
printf("*");
}
//Moves to the next line/row
printf("\n");
}
return 0;
}
答案 0 :(得分:0)
int main()
{
int i, j, n;
//Reads number of rows to be printed from user
printf("Enter value of n : ");
scanf("%d", &n);
i=1;
do
{
j=i;
do
{
printf("*");
j++;
}while(j<=n);
printf("\n");
i++;
}while(i<=n);
return 0;
}
答案 1 :(得分:0)
int main()
{
int i, j, n;
//Reads number of rows to be printed from user
printf("Enter value of n : ");
scanf("%d", &n);
i=1;
do
{
j=i;
do
{
printf("*");
j++;
}while(j<=n);
//Moves to the next line/row
printf("\n");
i++;
}while(i<=n);
return 0;
}