forked from sarjus/C-Programing-KTU
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPattern3.c
More file actions
32 lines (32 loc) · 817 Bytes
/
Pattern3.c
File metadata and controls
32 lines (32 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/******************************************************
* File : Pattern1.c
* Description : C Program to print the pattern
* *
* ***
* *****
* *******
* Author : Sarju S
* Version : 1.0
* Date : 25/06/2021
* ***************************************************/
#include<stdio.h>
int main(){
int row,i,j,starCount=1,k;
printf("\nEnter the number of rows:");
scanf("%d",&row);
//No of rows
printf("\n");
for(i=1;i<=row;i++){
//Printing the space
for(j=1;j<=row-i;j++){
printf(" ");
}
//print *
for(k=1;k<=starCount;k++){
printf("*");
}
printf("\n");
starCount+=2;
}
return 0;
}