C Program To Print Right Angled Triangle With Alphabets, using While Loop

preview_player
Показать описание

Lets write a C program to display/print/output a right angled triangle pattern formed with English Alphabets, using nested while loop.

Expected Output for the Input
If user enters number of rows as 5. Then our C program prints a Right angled Triangle with 5 rows of English Alphabets in it.

User Input:
num = 5;

Output:

A
B B
C C C
D D D D
E E E E E

C Programming Interview / Viva Q&A List

C Programming: Beginner To Advance To Expert
Рекомендации по теме
Комментарии
Автор

Can i ask something
Why do i have to write " start = 1; " in the while{ } but not " int start =1; " on the outside
I have tried to: "int start = 1;" from the outside but it kinda didn't work out

khoisida