Program : Print this Right angled Pyramid in C using Nested Loops
#include<stdio.h> #include<conio.h> main() { int i,j,lines; char ch = '*'; clrscr(); printf("Enter number of lines : "); scanf("%d",&lines); for(i=0;i <=lines;i++) { printf("\n"); for (j=0;j < i;j++) printf("%c ",ch); } getch(); }
Click here to cancel reply.