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

Sunday, December 29, 2019

C program to create alphabetical pattern - My CS Tutorial

C program to print alphabetical pattern.
In this tutorial we will learn how to write a c program that print or create a alphabetical pattern program.
We will enter the range of rows then pattern will be print.

Example:





C program code



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

  for(b=1;b<=num;b++)
  {
   printf("%c ",c);

  }
  c++;

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


OUTPUT:





In this output we can see that it is a numerical pattern.
In the first we will enter the range of rows then pattern will be print.
In this output the range of rows is 26 and the column and rows both are equal as 26.In this output all alphabets are printed in this pattern.


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