Advertisement
AndreyKlipikov

Subject 3. #13

Oct 24th, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     char k = 'A';
  9.     int i, j;
  10.     for(i = 0; i < 5; i++) {
  11.         for(j = 4 - i; j < 5; j++) {
  12.             printf("%c ", k);
  13.             k++;
  14.         }
  15.         printf("\n");
  16.     }
  17.     return 0;
  18. }
  19.  
  20.  
  21. // =========================================
  22.  
  23.  
  24. #include <iostream>
  25. #include <stdio.h>
  26.  
  27. using namespace std;
  28.  
  29. int main()
  30. {
  31.     char k = 'A';
  32.     int i = 0, j;
  33.     while(i < 5) {
  34.         j= 4 - i;
  35.         while(j < 5) {
  36.             printf("%c ", k);
  37.             k++;
  38.             j++;
  39.         }
  40.         printf("\n");
  41.         i++;
  42.     }
  43.     return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement