forked from ayushnagar123/cprogramming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcone patern
More file actions
45 lines (45 loc) · 645 Bytes
/
cone patern
File metadata and controls
45 lines (45 loc) · 645 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
33
34
35
36
37
38
39
40
41
42
43
44
45
/*INPUT=>10
OUTPUT=>
* * * * *
* * * *
* * *
* *
*
* *
* * *
* * * *
* * * * *
*/
#include<conio.h>
#include<stdio.h>
int main()
{
int n,i,j,k,y,x;
printf("enter a no.");
scanf("%d",&n);
for(i=(n/2);i>=1;i--)
{
for(j=(n/2);j>=i;j--)
{
printf(" ");
}
for(k=i;k>=1;k--)
{
printf("* ");
}
printf("\n");
}
for(i=2;i<=(n/2);i++)
{
for(j=i;j<=(n/2);j++)
{
printf(" ");
}
for(k=1;k<=i;k++)
{
printf("* ");
}
printf("\n");
}
return 0;
}