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

Thursday, December 19, 2013

Program Print Alphabet Triangle

/*
Write a C++ Program to display the following
alphabet triangle output by nested for loop.
  A
  AB
  ABC
  ABCD
  ABCDE

For Free C++ Programming Techniques (Example Programs), visit
Www.EasyCppProgramming.Blogspot.Com

and For Perfect computer notes
visit www.computergap.com
For Good study Notes
Visit   Www.ForFreeEducation.Blogspot.Com
*/

c++ program to print alphabet triangle easyway how to C++ Programs
C++ Program to output a right angle triangle of English alphabets Easyway C++


#include<conio.h>

void main()
{

  clrscr();

  char counter1, counter2;

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

  for ( counter1 =65; counter1<=69; counter1++)

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

        cout<<endl;
     }

  getch();

}
Share:

0 comments:

Post a Comment

We Love To Hear From You!

EasyCPPprogramming.blogspotcom

Blog Archive

Labels