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