Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  pattern
Language: C/C++
Code:
#include<stdio.h>
int main()
{
int i,j,rows,space;
printf("Enter number of rows:");
scanf("%d",&rows);
for(i=1;i<=rows;i++)
{
for(space=rows-i;space>=1;space--){
printf(" ");
}
for(j=1;j<=(2*i)-1;j++){
printf("*");
}
printf("\n");
}
}
Comments: