- Write a C program to print the following pattern:
2. *
3. * *
4. * * *
5. * * * *
By Gulshan Arora
- Write a C program to print the following pattern:
7. * *
8. * * * * * *
9. * * * * * * * * * *
10.* * * * * * * * * * *
By Gulshan Arora
- Write a C program to print the following pattern:
12.* *
13. * *
14.* * * *
15. * * * *
16.* * * * *
17. * * * *
18.* * * *
19. * *
20.* *
- Write a C program to print the following pattern:
22.* * * * *
23. * * * *
24. * * *
25. * *
26. *
27. * *
28. * * *
29. * * * *
30.* * * * *
- Write a C program to print the following pattern:
32.*
33. * * *
34. * * * * *
35. * * * * * * *
36. * * * * * * * * *
37. * * * * * * *
38. * * * * *
39. * * *
40. *
41. * * *
42. * * * * *
- Write a C program to print the following pattern:
44.*
45. * *
46. * * *
47. * * * *
48. * * *
49. * *
50. *
- Write a C program to print the following pattern:
52.* * * * * * * * *
53.* * * * * * * *
54.* * * * * *
55.* * * *
56.* *
57.* * * *
58.* * * * * *
59.* * * * * * * *
60.* * * * * * * * *
- Write a C program to print the following pattern:
62.* * * * * * * * * * * * * * * * *
63. * * * * * * * * * * * * * *
64. * * * * * * * * * *
65. * * * * * *
66. * * * * * * * * *
67. * * * * * * *
68. * * * * *
69. * * *
70. *
- Write a C program to print the following pattern:
72.*
73. * * *
74. * * * * *
75.* * * * * * *
76.* *
77.* * * *
78.* * * * * *
79.* * * * * * *
80.* * * * * *
81.* * * *
82.* *
83.* * * * * * *
84. * * * * *
85. * * *
86. *
- Write a C program to print the following pattern:
88.* * * * * * * * * * * * * * * * * * * * * * * * *
89. * * * * * *
90. * * * * * *
91. * * * * * *
92. * * *
93. * * * * * *
94. * * * * * *
95. * * * * * *
96.* * * * * * * * * * * * * * * * * * * * * * * * *
*
* *
* * *
* * * *
Program:
/* This is a simple mirror-image of a right angle triangle */
#include
int main() {
char prnt = '*';
int i, j, nos = 4, s;
for (i = 1; i <= 5; i++) {
for (s = nos; s >= 1; s--) { // Spacing factor
printf(" ");
}
for (j = 1; j <= i; j++) {
printf("%2c", prnt);
}
printf("\n");
--nos; // Controls the spacing factor
}
return 0;
}
- Write C program to print the following pattern:
3. * *
4. * * * * * *
5. * * * * * * * * * *
* * * * * * * * * * *
Program:
#include
int main() {
char prnt = '*';
int i, j, k, s, c = 1, nos = 9;
for (i = 1; c <= 4; i++) {
// As we want to print the columns in odd sequence viz. 1,3,5,.etc
if ((i % 2) != 0) {
for (j = 1; j <= i; j++) {
printf("%2c", prnt);
}
for (s = nos; s >= 1; s--) { //The spacing factor
if (c == 4 && s == 1) {
break;
}
printf(" ");
}
for (k = 1; k <= i; k++) {
if (c == 4 && k == 5) {
break;
}
printf("%2c", prnt);
}
printf("\n");
nos = nos - 4; // controls the spacing factor
++c;
}
}
return 0;
}
- Write C program to print the following pattern:
7. * *
8. * *
9. *