In this tutorial we will creat a C program that print a pattern without any loop or any conditions.We will write this program by only printf statements.So lets start:-
C program code
#include<stdio.h>
#include<conio.h>
void main()
{
printf("\n ************ ");
printf("\n * H * ");
printf("\n * A * ");
printf("\n * R * ");
printf("\n * S * ");
printf("\n * H * ");
printf("\n ************ ");
printf("\n ");
printf("\n\t ************ ");
printf("\n\t * C * ");
printf("\n\t * H * ");
printf("\n\t * A * ");
printf("\n\t * U * ");
printf("\n\t * H * ");
printf("\n\t * A * ");
printf("\n\t * N * ");
printf("\n\t ************ ");
printf("\n ");
printf("\n\t\t ************* ");
printf("\n\t\t * * ");
printf("\n\t\t * * ");
printf("\n\t\t * STUDENT * ");
printf("\n\t\t * B.SC CS * ");
printf("\n\t\t * * ");
printf("\n\t\t * * ");
printf("\n\t\t ************* ");
printf("\n ");
printf("\n\t\t\t ************* ");
printf("\n\t\t\t * * ");
printf("\n\t\t\t * * ");
printf("\n\t\t\t * 2ND. * ");
printf("\n\t\t\t * YEAR. * ");
printf("\n\t\t\t * * ");
printf("\n\t\t\t * * ");
printf("\n\t\t\t ************* ");
printf("\n ");
printf("\n\t CREATED BY -- HARSH CHAUHAN");
printf("\n ");
getch();
}
OUTPUT:
we can see the output of this program and patter or style of output with out any loop or any condition statement by only printf statements.
Please share this post and blog link with your friends.For more programs use this blog.
If you have any problem, please comment in comment box, subscribe this blog for notifications of new post on your email and follow this blog.
Created by-- HARSH CHAUHAN
No comments:
Post a Comment