Program 145:
//Coming Soon...
Output:
#include<stdio.h> main() { int i,j,k,rows,count,temp,alpha; printf("Enter number of rows:\n"); scanf("%d",&rows); count=1; // using formula a+(n-1)*d temp=1+(rows-1)*2; alpha=65; for(i=1;i<=rows;i++) { for(j=1;j<=count;j++) { printf(" "); } for(k=1;k<=temp;k++) { printf("%c",alpha); } count++; temp-=2; alpha++; printf("\n"); } }Explanation:
//Coming Soon...
Output: