Skip to content

Commit 52fa54e

Browse files
committed
Change: Changed C/41.triangle/triangle3.c
1 parent a2ba96c commit 52fa54e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

C/41.triangle/triangle3.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include "../shit.h"
2+
3+
int main(void)
4+
{
5+
int i, j, len;
6+
7+
puts("Generates an isosceles right-angled triangle with a right angle at the bottom right.");
8+
9+
printf("Short side:"); scanf("%d", &len);
10+
11+
for (i = 1; i <= len; i++)
12+
{
13+
for (j = 1; j <= len - i; j++)
14+
putchar(' ');
15+
for (j = 1; j <= i; j++)
16+
putchar('*');
17+
putchar('\n');
18+
}
19+
20+
return 0;
21+
}

0 commit comments

Comments
 (0)