-
Notifications
You must be signed in to change notification settings - Fork 0
/
print full pyramid using star.php
78 lines (68 loc) · 1.82 KB
/
print full pyramid using star.php
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
s
<html>
<head>
<style> div.cd{background:teal;} a{text-decoration:none; color:white;} p{font-size:20;text-align:justify;} th:hover{background-color:black;} th{font-size: 20}
</style>
</head>
<body bgcolor="">
<div class="cd" style="color:white;font-size:50;width:100%;top:0;left:0;position:sticky;border: 1px solid black">
<table >
<tr> <td><img src="logo.png" width="100" height="100" style="padding-left:50" alt="loading.."></td>
<td> <font color="white" size="33" face="cooper" > Fast & Furious Logics </font> </td>
<form method="post" action="<?php $_PHP_SELF ?>">
<td align="right" style="padding-left:350;font-size:25">
<font color="white" face="cooper" > search <input type="text" name="search">
</font>
</td>
</form>
</tr>
</table>
</div>
<table >
<tr >
<td height="100%" valign="top">
<iframe src="links.php" height="520" style="overflow:scroll;top:0"></iframe>
</td>
<td valign="top" style="font-size: 20;font-family: cursive;" width="750">
<div style="overflow: scroll ; height:550;">
<h1>
print full pyramid using *
</h1>
<pre>
*
* * *
* * * * *
* * * * * * *
* * * * * * * * *
Source Code
#include <stdio.h>
int main()
{
int i, space, rows, k=0;
printf("Enter number of rows: ");
scanf("%d",&rows);
for(i=1; i<=rows; ++i, k=0)
{
for(space=1; space<=rows-i; ++space)
{
printf(" ");
}
while(k != 2*i-1)
{
printf("* ");
++k;
}
printf("\n");
}
return 0;
}
</pre>
</div>
</td>
<td valign="top">
<iframe src="comment.php" height="520"></iframe>
</td>
</tr>
</table>
</body>
</html>