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();
}
Comments
Post a Comment