You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
481 B
C

/* Pattern problem
A
A B
A B C
A B C D
A B C D E
*/
#include <stdio.h>
#include <conio.h>
void main()
{
int i, j, n ;
clrscr() ;
printf("Required pattern is as follows: \n") ;
for(i=1 ; i<=5 ; i++)
{
for(j=1 ; j<=i ; j++)
printf("%c ", j+64) ;
printf("\n") ;
}
getch();
}
/*
Output:
Required pattern is as follows:
A
A B
A B C
A B C D
A B C D E
*/