Star Pattern-II - 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=n;j>=i;j--)
{
printf(" * ");
}
printf("\n");
}
return 10;
}
No comments:
Post a Comment