Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include<windows.h>
- int main()
- {
- int ile,i,j,l,szer,wys;
- scanf("%d",&ile);
- system("cls");
- CONSOLE_SCREEN_BUFFER_INFO csbi;
- GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
- szer = csbi.srWindow.Right - csbi.srWindow.Left + 1;
- printf("%d\n",szer);
- //wys = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
- l=(szer-ile)/2;
- for(i=0;i<ile;i+=2)
- {
- for(j=((ile-i)/2)+l;j>0;j--)
- printf(" ");
- for (j=i;j>=0;j--)
- printf("*");
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement