-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathCP4PSTAR.C
More file actions
56 lines (46 loc) · 652 Bytes
/
CP4PSTAR.C
File metadata and controls
56 lines (46 loc) · 652 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
46
47
48
49
50
51
52
53
54
55
56
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k,l;
l=5;
//char c='Z';
clrscr();
printf("\t\t\t\PATTERNS\t\t\t\n");
printf("PATTERN 1===================================\n");
for(i=1;i<=l;i++)
{
for(j=1;j<=i;j++)
{
printf(" ");
}
for(k=5;k>=i;k--)
{
printf("*");
}
printf("\n");
}
printf("PATTERN 2===================================\n");
for(i=1;i<=l;i++)
{
for(j=1;j<=i;j++)
{
printf("@");
}
for(k=l-i+1;k>0;k--)
{
printf("*");
}
printf("\n");
}
printf("PATTERN 3===================================\n");
for(i=5;i>=1;i--)
{
for (j=i;j>=1;j--)
{
printf("* ");
}
printf("\n");
}
getch();
}