ito po yung problem:
Write a program to display the output below: You may input number of rows and colums.
Sample Output if Applicable
*
* * *
* * * * *
* * * * * * *
* * * * * * * * *
* * * * * * * * * * *
ito po yung code ko:
#include <stdio.h>
int main()
{
int rows, i, j, space;
printf("Input number of rows:");
scanf("%d",&rows);
for(i = 1; i <= rows; i++)
{
for(space = i; space < rows; space++)
{
printf("");
}
for(j = 1; j <= (2 * i - 1); j++)
{
printf("*",);
}
printf("\n");
}
return 0;
}
Ang out put po ng code ko is Half lang di po sya full na pyramid ano po kaya kulang?
Write a program to display the output below: You may input number of rows and colums.
Sample Output if Applicable
*
* * *
* * * * *
* * * * * * *
* * * * * * * * *
* * * * * * * * * * *
ito po yung code ko:
#include <stdio.h>
int main()
{
int rows, i, j, space;
printf("Input number of rows:");
scanf("%d",&rows);
for(i = 1; i <= rows; i++)
{
for(space = i; space < rows; space++)
{
printf("");
}
for(j = 1; j <= (2 * i - 1); j++)
{
printf("*",);
}
printf("\n");
}
return 0;
}
Ang out put po ng code ko is Half lang di po sya full na pyramid ano po kaya kulang?