Perform looping with if statement.

C Program to  create if loop

#include<conio.h>
#include<stdio.h>
void main()
{
    int i,j,k,l=1;
    clrscr();
    i=1;
    i1:
    if(i<=5)
    {
        j=4;
        j1:
        if(j>=i)
        {
            printf(" ");
            j--;
            goto j1;
        }
        k=1;
        k1:
        if(k<=l)
        {
            printf("*");
            k++;
            goto k1;
        }
        l+=2;
        printf("\n");
        i++;
        goto i1;
    }
    getch();
}


Output:


Comments

Popular posts from this blog

SKILL ROCKS TECH QUESTIONS

C Program for Analog Clock Design

Php Check is date or not