#include<stdio.h> int main() { int len,i,j; int count_a , count_b; printf("Enter Number Of Lines Of The Pyramid :\n"); scanf("%d",&len); printf("\n"); count_a = count_b = len-1; for(i=0; i<len; i++) { for(j=0; j<2*len-1; j++) { if(j>=count_a && j<=count_b) printf("*",j); else printf(" "); } count_a-- ,count_b++; printf("\n"); } printf("\n\n"); return 0 ; }
Most Popular
-
Befunge: Developed by : Chris Pressey Year: 1993 Stack-based, reflective, esoteric programming language.
-
-
The list below is an unordered list. You can pick any book you like, and some of the books don’t even cover a programming language at all,...
-
Recursion happens when function calls itself directly or indirectly.
Copyrights © 2016 Codzya. Powered by Blogger.
Monday, May 16, 2016
Subscribe to:
Post Comments (Atom)
Recent
Weekly
-
Befunge: Developed by : Chris Pressey Year: 1993 Stack-based, reflective, esoteric programming language.
-
-
The list below is an unordered list. You can pick any book you like, and some of the books don’t even cover a programming language at all,...
-
Recursion happens when function calls itself directly or indirectly.
-
1- The C Programming Language This book is a comprehensive guide to the finalized ANSI standard C language programming. It has b...
Comment
Get this Recent Comments Widget
!->
0 Comment to "Print Pyramid Using *"
Post a Comment