Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Ve tam gia can dac
- // Khai bao cac ham thu vien neu co
- #include<stdio.h>
- #include<conio.h>
- void main()
- {
- int i,j,h;
- printf("Nhap chieu cao tam giac can: ");
- scanf("%d",&h);
- for(i=1;i<=h;i++)
- {
- for(j=1;j<=h-i;j++) printf(" ");
- for(j=h-i+1;j<=h+i-1;j++) printf("*");
- printf("\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment