Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. contoh program:
  2.  
  3. #include <stdio.h>
  4.  
  5. int main(){
  6. int n;
  7. scanf("%d", &n);
  8.  
  9. //siku-siku kiri bawah
  10. for(int i=0; i<n; i++){
  11. for(int j=0; j<=i; j++){
  12. printf("*");
  13. }
  14. printf("\n");
  15. }
  16. }
  17.  
  18.  
  19. buatlah pola berdasarkan input
  20.  
  21. input = 4
  22.  
  23.  
  24. *
  25. **
  26. ***
  27. ****
  28.  
  29.  
  30. ****
  31. ***
  32. **
  33. *
  34.  
  35.  
  36. *
  37. **
  38. ***
  39. ****
  40.  
  41.  
  42. ****
  43. ***
  44. **
  45. *
  46.  
  47.  
  48. *
  49. ***
  50. *****
  51. *******
  52.  
  53.  
  54. *******
  55. *****
  56. ***
  57. *
  58.  
  59.  
  60. *
  61. ***
  62. *****
  63. *******
  64. *****
  65. ***
  66. *
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement