Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main ()
- {
- int rows,star,spaces;
- /* x = number of stars */
- /* y = number of rows */
- int x = 6;
- int y = x;
- for(rows=1;rows<=y;rows++)
- {
- for(spaces=1;spaces<=x;spaces++)
- {
- printf(" ");
- }
- for(star=1;star<=rows;star++)
- {
- printf("#");
- printf(" ");
- }
- printf("\n");
- x = x-1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment