C program to create a numerical 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....

Tuesday, December 31, 2019

C program to create a numerical pattern - My CS Tutorial

C program to print or create a numerical pattern.
In this tutorial we will learn how to write a c program to print or create a numerical pattern. In which we will enter the range of rows then the pattern will be print.
This pattern print all number symbols from 1 to entered range.As if we will enter the range of rows is 5 then the pattern is.....

Example:




C program code


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

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


OUTPUT:



In this output we can see that it is a numerical pattern. In this output the range of rows is 15 and total number of rows is 15 and total number symbols that are available in rows is 15.


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