#include <stdio.h>
int main() {
char prnt = 'A';
int i, j;
for (i = 1; i <= 5; i++) { // Prints the right angle triangle
for (j = 1; j <= i; j++) {
printf("%2c", ((prnt + (i - j)))); // Prints the characters in the required order
}
printf("\n");
}
return 0;
}
No comments:
Post a Comment