Write a Program to Print Half pyramid of alphabets in C. |
// Write a Program to Print Half pyramid of alphabets in C.
#include <stdio.h> #include <conio.h> void main() { int i, j; char
input, alphabet = 'A';
printf("Enter an uppercase character you want to print in the
last row: ");
scanf("%c", &input); for (i =
1; i <= (input - 'A' + 1); ++i) { for (j
= 1; j <= i; ++j) {
printf("%c ", alphabet); }
++alphabet;
printf("\n"); } } |
Output Enter an uppercase character you want to print in the last row: E A B B C C C D D D
D E E E
E E |
The Chi Tin Pocket Pocket Iron Flated Stainless Steel
ReplyDeleteStainless steel Pocket Iron Flated Stainless Steel and Stainless Steel Nickel Baysuit. Buy The babyliss pro nano titanium Chi Tin Pocket titanium trimmer Iron Flated snow peak titanium spork Stainless Steel and Stainless Steel $9.99 titanium crystal · Out ford edge titanium of stock