Contact Learn C
Copy

Program 310: Spiral Alphabet Pattern in C

Program 310: Spiral Alphabet Pattern in C
 
#include<stdio.h>
main()
{
 int i,rows,k=1;
 printf("Enter number of Rows for Spiral Alpha Pattern from 1 to 13\n");
 scanf("%d",&rows);
  if(rows<=13 && rows>=1){
 for(i=1;i<=rows*2;i+=2)
 {
  if(k%2==1)
  {
   printf("%c %c",i+64,i+65);
   k++;
  }
  else
  {
   printf("%c %c",i+65,i+64);
   k++;
  }
  printf("\n");
 }
  }
  else
  {
   printf("Please Enter from 1 to 13 only\n");
  }
}
Spiral Number Pattern 
Explanation:
Spiral Alphabet Pattern in C

//Coming Soon...

Output:
Spiral Alphabet Pattern in C



Donate

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide