Advertisement
Guest User

Untitled

a guest
Aug 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include<iostream>
  2. #include<conio.h>
  3. using namespace std;
  4. int no();
  5. char c='A';
  6.  
  7. int no(){
  8. char a, b;
  9.  
  10.  
  11. for(a='A' ; a<='C'; a++ )
  12. {
  13. for ( b= 'A' ; b<=a ; b++, c++)
  14. {
  15. cout<<" ";
  16. }
  17.  
  18. for (char d='D'; d>a ; d--, c++)
  19. {
  20. cout<<c;
  21. }
  22. for(char c= 'C' ; c>a ; c--)
  23. {
  24. cout<<c;
  25. }
  26.  
  27.  
  28. cout<<endl;
  29. }
  30.  
  31. }
  32.  
  33. int main(){
  34. char a, b;
  35.  
  36.  
  37. for(a='A' ; a<='C'; a++ )
  38. {
  39. for(char c= 'C' ; c>=a ; c--)
  40. {
  41. cout<<" ";
  42. }
  43.  
  44. for ( b= 'A' ; b<=a ; b++, c++)
  45. {
  46. cout<<c;
  47. }
  48.  
  49. for (char d='A'; d<a ; d++, c++)
  50. {
  51. cout<<c;
  52. }
  53. cout<<endl;
  54. }
  55. no();
  56. getch();
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement