Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int i,j,k,triangles,counter = 1;
- printf("Entre com a quantidade de triangulos :\n"); scanf("%d",&triangles);
- for (i = 1; i <= triangles; i++)
- {
- for (j = 1; j <= i; j++)
- {
- for (k = 1; k <= counter; k++)
- {
- printf("* ");
- }
- printf("\n");
- counter++;
- }
- counter = 1;
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment