C : Program to print 1 to 10 numbers in right half pyramid shape
Oct 23, 2023
Program :
//c program to print 1 to 10 numbers in right half pyramid shape
#include<stdio.h>
int main()
{
int n=1;
for(int i=1; i<=4; i++)
{
for(int j=1; j<=i; j++)
{
printf("%3d", n);
n++;
}
printf("\n");
}
return 0;
}
Output :