Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //problem no a
- #include <stdio.h>
- int main()
- {
- int row, c, n, s;
- scanf("%d", &n);
- s = n;
- for (row = 1; row <= n; row++)
- {
- for (c = 1; c < s; c++)
- printf(" ");
- s--;
- for (c = 1; c <= 2*row - 1; c++)
- printf("*");
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement