C Program for printing Right Angled Triangle Shape

Program Code:

#include<stdio.h>
int main()
{
int i, j ,l;
for(i=1;i<=10;i++)
{
    printf("-");

for(j=1;j<i;j++)
{
printf("  ");
}
printf("*");
printf("\n");
}
for(l=0;l<20;l++)
printf("+");
printf("\n");
}

Output:

.exe file

No comments:

Post a Comment

Please disable your ad blocker to support this website.

Our website relies on revenue from ads to keep providing free content.