Wednesday, 8 September 2021

Write a program to print the inverted full Pyramid of alphabets...

#include<stdio.h>
#include<conio.h>

void main()


{
	
	int i,j,rows,k;
	
	printf("Enter a number to define the rows: ");
	scanf("%d",&rows);
	
	for(i=1;i<=rows;i++)
	{
		for(j=1;j<=i;j++)
		{
			printf(" ");
		}
		
		for(k=i;k<=rows;k++)
		{
			printf("%c ",'A'+k);
		}
		printf("\n");
	}
	getch();
}
YouTube Video..

No comments:

Post a Comment

Program to check whether the reverse string is a palindrome

  # include < stdio.h > # include < string.h > int main ( ) { //declare variables char str1 [ 30 ] ; int i , len...