C : program to print A in right half pyramid
Oct 18, 2023
Program :
/* A
AA
AAA
AAAA */
#include<stdio.h>
int main()
{
int rows;
printf("Enter the number of rows : ");
scanf("%d", &rows);
for(int i=1; i<=rows; i++)
{
for(int j=1; j<=i; j++)
{
printf("A");
}
printf("\n");
}
return 0;
}
Output :