Program to print following triangle.
A
A B
A B C
A B C D
Answers
Answered by
0
Answer:
// C++ code for triangular
// patterns of alphabets
#include <bits/stdc++.h>
using namespace std;
int main()
{
int i, j, n = 5;
for (i = 1; i <= n; i++)
{
for (j = i; j <= n; j++)
{
cout << (char)('A' - 1 + j) << " ";
}
cout << endl;
}
return 0;
}
// This code is contributed by
// shubhamsingh10
C
Java
Python3
C#
PHP
Output:
A B C D E
B C D E
C D E
D E
E
Answered by
0
Answer:
The python code goes like:
Similar questions