Skip to main content
Search
Search This Blog
CODE WITH FREAK
Every feature was once a bug 🐞
Home
More…
Share
Get link
Facebook
X
Pinterest
Email
Other Apps
Labels
C Programming
November 27, 2020
ABCDPattern
#include
<stdio.h>
int
main
(){
char
letters
[]=
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
;
/*
A
BB
CCC
DDDD
EEEEE
*/
int
n;
printf
(
"Enter the size: "
);
scanf
(
"
%d
"
,
&
n);
for
(
int
i
=
0
;i
<
n;i
++
){
for
(
int
j
=
0
;j
<=
i;j
++
){
printf
(
"
%c
"
,letters[i]);
}
printf
(
"
\n
"
);
}
return
0
;
}
Output
Comments
Popular Posts
September 19, 2021
Best time to buy and sell stocks I
November 12, 2021
Find Starting and Ending Position of an element using BS: logN + logN
Comments
Post a Comment