Created
November 22, 2018 12:24
-
-
Save rkhang7/0853b47c38a32bcce1a979820f1d0ff8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // viet chuong trinh in ra tam giac can co chieu cao h | |
| #include <stdio.h> | |
| #include <Conio.h> | |
| int main() | |
| { | |
| int h; | |
| printf("Nhap chieu cao h=");scanf("%d",&h); | |
| for(int i=1;i<=h;i++) | |
| { | |
| for(int j=1;j<=h-i;j++) | |
| printf(" "); | |
| for(int k=1;k<=2*i-1;k++) | |
| printf("*"); | |
| printf("\n"); | |
| } | |
| getch(); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment