C ++ Program for Printing English Alphabets in Triangle Shape

Program Code:

#include<iostream>
using namespace std;
int main()
{
    for(int i=0;i<26;i++)
    {
    for(int j =0 ;j<=i;j++)
    {
      char z;
    z = (char)(j + 65);
    cout<<z<<" ";
    }
    cout<<endl;
    }
}

Output:

.exe file

No comments:

Post a Comment

Please disable your ad blocker to support this website.

Our website relies on revenue from ads to keep providing free content.