C : program to print A in right half pyramid

--

Program :

/* A
AA
AAA
AAAA */

#include<stdio.h>

int main()
{
int rows;

printf("Enter the number of rows : ");
scanf("%d", &rows);

for(int i=1; i<=rows; i++)
{
for(int j=1; j<=i; j++)
{
printf("A");
}
printf("\n");
}


return 0;
}

Output :

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Programmer Portfolio
Programmer Portfolio

Written by Programmer Portfolio

Code enthusiast. Learning, practicing, and sharing my journey through various programming languages, one code at a time. 🚀💻

No responses yet

Write a response