C program to print a symbol pattern - My CS Tutorial - My CS Tutorial

Breaking

Programming languages full tutorial and programs, exam papers, visual basic( Vb.net ), information of new technologies and more....

Monday, December 30, 2019

C program to print a symbol pattern - My CS Tutorial

C program code to print or create a symbol star pattern.
In this tutorial we will learn how to write a c program code to create a symbol pattern. In the first we will enter the range of rows then the pattern will be print.

Example:



C program code


#include<stdio.h>
#include<conio.h>
void main()
{
 int a,b,num;
 printf("\n Enter the range of rows:\n ");
 scanf("%d",&num);
 printf("\n");
 for(a=1;a<=num;a++)
 {
  for(b=1;b<=num;b++)
  {
   printf(" * ");

  }
  
 printf("\n");
 }
 getch();
}


OUTPUT:




In this output we can see that it is a star symbol pattern.
The range of this pattern is 15 and the total rows and columns of symbols is 15.
In the first we will enter the range of rows then the pattern will be print.




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.If you have any method of this program or want to give any suggestion send email on hc78326@gmail.com

Created by-- HARSH CHAUHAN

No comments:

Post a Comment