Star Pattern-I - Placement Practice Questions @ C/C++
Special Thanks to - Rishubh Pratap Singh
A. Output
B. Code in C
#include <stdio.h>
int main()
{
int i,j,n;
printf("Enter the number of rows");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
printf(" * ");
}
printf("\n");
}
return 0;
}
No comments:
Post a Comment