Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- #include<stdlib.h>
- #include<Windows.h>
- void main()
- {
- int width,row,positionT=35,positionH=36;
- for (row = 2; row; row--)
- {
- for (width = 71; width; width--) printf("-");
- printf("\n");
- for (width = 71; width; width--)
- if ((width % 2) == 0)
- if (((positionT > 35 && row == 2) && (width / 2 == positionT - 35))|| ((positionT <= 35 && row == 1) && (width / 2 == positionT))) printf("T");
- else printf(" ");
- else printf("|");
- printf("\n");
- for (width = 71; width; width--)
- if ((width % 2) == 0)
- if (((positionH > 35 && row == 2) && (width / 2 == positionH - 35)) || ((positionH <= 35 && row == 1) && (width / 2 == positionH))) printf("H");
- else printf(" ");
- else printf("|");
- printf("\n");
- for (width = 71; width; width--) printf("-");
- printf("\n");
- printf("\n");
- }
- _getch();
- }//end program
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement