/*-------------------------------------------------------------------*/ /*Here adding the two files to use Google Code Prettify*/ /*-------------------------------------------------------------------*/ Assignments of C-Lab
MID-TERM IS GOING TO COME STUDY FROM NOW 😤!!!!!


Assignments of C-Lab

No comments

 



// program to print floyd's triangle till n lines

#include <stdio.h>
#include <conio.h>

void main()
{

    int i = 1, n, b, j = 0;
    printf("Enter number of lines to print floyd's triangle\n");
    scanf("%d"&n);

    for (; i <= n; i++)

    {

        for (b = 1; b <= i; b++)
        {
            j++;
            printf("%d", j);
        }
        printf("\n");
    }
    getch();
}







No comments :

Post a Comment

Note: Only a member of this blog may post a comment.