Entering the value between 1 to 65 and print Characters

How to print the characters by entering the value between 1 to 65 in C++ programming Language?

#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int r,c,E;
int Num=65;
cout<<"Enter The Ending Value .  ";cin>>E;
cout<<endl<<endl;
for(r=1;r<=E;r++)
{
for(int i=0; i<=E-r; i++)
{
cout<<char(Num);
Num++;
}
for(c=1; c<=r; c++)
{
cout<<"*";
}
cout<<endl;
}
getch();
}

Output Result

By Entering the value of 45.





By Entering the value of 10.



Comments

Popular posts from this blog

How To Print Characters

Multiplication program in CPP Language

Factorial Program In Cpp Language