Panagram in C

Let’s have a look at the program of Panagram in C programming Language. A Panagram is a sentence containing every letter of the alphabet like “The quick brown fox jumps over the lazy dog” . This sentence consists of all the alphabet.

Examples of Sentences Containing all the Alphabet[A-Z]

  • The five boxing wizards jump quickly.
  • Sympathizing would fix Quaker objectives.
  • Many-wived Jack laughs at probes of sex quiz.
  • Turgid saxophones blew over Mick’s jazzy quaff.
  • Playing jazz vibe chords quickly excites my wife.
  • A large fawn jumped quickly over white zinc boxes.
  • Exquisite farm wench gives body jolt to prize stinker.
  • Jack amazed a few girls by dropping the antique onyx vase!
  • The quick brown fox jumps over the lazy dog

C Program to Check if a Given String is Panagarm or not.

#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{
int x[26]={0},i,n;<br / char c[100];
clrscr();
gets(c);
n=strlen(c);
for(i=0;i<n;i++)
{
if(c[i]>=65&&c[i]<=90)
x[c[i]-26]++;
else if(c[i]>=97&&c[i]<=122)
x[c[i]-97]++;
}
for(i=0;i<26;i++)
{
if(x[i]==0)
{
break;
}
}
if(i==26)
{
printf(“panagram”);
}
else
{
printf(“not panagram”);
}
return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Shopping cart