D Pattern Programs in C Programming Language || C Programming Language || C Programs.

 


  D Programs to Creat C alphabet Program in C Programming Language.

                            Write a C Program for make a D Pattern in C Language. This Program make by Vighu. This Program make by for loop. This Program Print D Pattern.Program for Print a D Paterrn in C Program. 


Source Code :- 

/*
        ##################################################################################
        ##################################################################################
        ##                                                                              ##
        ##                   Program Name :- D Pattern Program                          ##      
        ##                   Created By   :- Vighu                                      ##
        ##                                                                              ##
        ##################################################################################
        ##################################################################################

*/


#include<stdio.h>

int main(int argcchar const *argv[])
{
    int n =5;
    int ij;

    for (i =1i <= ni++)
    {
        for (j = 1j<= nj++)
        {
            if (j ==1 || ((i == 1 || i == n) && j <= n -1))
            {
                printf("*");
            }
            
            else if (i != 1 && i !=n && j == n)
            {
                printf("*");
            }
            
            else
            {
                printf(" "); // whitespace
            }
        }
        printf("\n");
    }
    return 0;
}


                


Comments

Popular Posts