heryvandoro

Looping Char

Nov 28th, 2016
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4. int huruf=65;
  5. for(int i=0; i<5; i++){
  6. for(int j=0; j<=i; j++){
  7. printf("%c ", huruf);
  8. huruf++;
  9. }
  10. printf("\n");
  11. }
  12. huruf=71;
  13. int temp=75;
  14. for(int i=4; i>=0; i--){
  15. temp=temp-i;
  16. huruf=temp;
  17. for(int j=0; j<i; j++){
  18. printf("%c ", huruf);
  19. huruf++;
  20. }
  21. printf("\n");
  22. }
  23. getchar();
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment