Tuesday, May 16, 2017

A Tale of Programming : Ascending Triangle

#include<stdio.h>
main()
{
    int n;
    printf("Enter n:"); scanf("%d",&n);
    for(int i=0;i<n;i++)
    {
        for(int j=1;j<=1+i;j++)
        {
            printf("*");
        }
        printf("\n");

    }

}







No comments:

Post a Comment