Triangle of Characters(CPP)


How  To Create the Triangle of  Characters in C++ programming Language?

#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int a,b,N=65;
for(a=7;a>=1;a--)
{
for(b=0;b<a; b++)
{

cout<<"  ";
cout<<char(N);
N++;
}
cout<<endl;
}
getch();
}
 

Output Result



Comments

Popular posts from this blog

Even/Odd Number Checking Code in CPP

Calculating Name and Marks in Cpp