Advertisement
nguyenhappy92

In ra tam giác vuông bên phải

Oct 13th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. // In ra tam giac vuong ben phai
  2. // Khai bao cac ham thu vien neu co
  3.  
  4. #include<stdio.h>
  5. #include<conio.h>
  6.  
  7. void main()
  8. {
  9. int i,j,n;
  10. printf("\n nhap chieu cao cua hinh tam giac:");
  11. scanf("%d",&n);
  12. for (i = 0;i<n;i++)
  13. {
  14.  
  15.  
  16. for(j=0;j<i+1;j++)
  17. printf("*");
  18. for (j=n-1;j>i;j--)
  19. printf(" ");
  20. printf("\n");
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement