We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5c05c2 commit 3ce9fa8Copy full SHA for 3ce9fa8
pryamid using *
@@ -0,0 +1,23 @@
1
+#include<stdio.h>
2
+int main() {
3
+ int r, s, rows=0;
4
+ int t=0;
5
+ clrscr();
6
+ printf("Enter number of rows to print the pyramid: ");
7
+ scanf("%d", &rows);
8
+ printf("\n");
9
+ printf("The Pyramid Pattern for the number of rows are:");
10
+ printf("\n\n");
11
+ for(r=1;r<=rows;++r,t=0) {
12
+ for(s=1; s<=rows-r; ++s){
13
+ printf(" ");
14
+ }
15
+ while (t!=2*r-1) {
16
+ printf("* ");
17
+ ++t;
18
19
20
21
+ getch();
22
+ return 0;
23
+}
0 commit comments