Hi, I have this program in C that prints me a right character triangle but I created it in a way that it asks me for the number of rows I want to print, but what I actually want to insert is the letter that I want at the bottom, for example if I insert the number 3, it prints me:
A
BB
CCC
DDDD
BUT what I really want is to insert the letter D in order to print the triangle bellow.
this is my program, it was really hard for me to make out this I'm kind of new in this C thing. please help me.
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,n;
char c;
clrscr();
printf("Enter the value of n:");
scanf("%d",&n);
c=65;
for(i=0;i<=n;i++)
{
for(j=0;j<=i;j++)
{
printf("%c",c);
}
c++;
printf("\n\n");
}
getch();
}