C++ tutorial, C++ programs, C++ Exercises, C++ Example Programs

Showing posts with label Program Print Alphabet Triangle Downside. Show all posts
Showing posts with label Program Print Alphabet Triangle Downside. Show all posts

Thursday, December 19, 2013

Program Print Alphabet Triangle Downside

 

/*
Write a C++ Program to display the following
alphabet triangle output by nested for loop.
  ABCDE
  ABCD
  ABC
  AB
  A
For Free C++ Programming Techniques (Example Programs), visit
Www.EasyCppProgramming.Blogspot.Com

and For Good Notes
Visit   Www.ForFreeEducation.Blogspot.Com
*/
#include<iostream.h>

#include<conio.h>

void main()
{

  clrscr();

  char counter1, counter2;

  cout<<"\n\n ----------- Results ------------\n";

  for ( counter1 =69; counter1>=65; counter1--)

     {
        for(counter2=65; counter2<=counter1; counter2++)
        cout<<counter2;

        cout<<endl;
     }

  getch();

}
Share:

EasyCPPprogramming.blogspotcom

Labels