Don't miss

Saturday 17 August 2013

C++: Alphabet Staircase


By on 2:19:00 pm

Program to show Alphabetical Staircase










Output will be
A
AB
ABC
ABCD
ABCDE

Code is :
#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();
for(int i=65; i<=69; i++)  //To make a bigger staircase , just increase max limit of i from 69 to what you need
{cout<<"\n";
for(char j=65; j<=i; j++)
cout<<j;
}
getch();
}

0 comments:

Post a Comment