panagram in c
//Pangram is string that contains all the alphabets in it
#include<stdio.h>
#include<ctype.h>
int main() {
int arr[91]={0}, flag = 1;
char c;
while(scanf("%c",&c)==1){
c = toupper(c);
arr[(int)c]++;
}
for(int i=65; i<91;i++){
if(arr[i]==0)
flag = 0;
}
if(flag)printf("panagram");
else printf("not panagram");
return 0;
}
0
0
#include<stdio.h>
#include<conio.h>
void main()
{
char str[100]="The quick brown fox jumps over the lazy dog";
int i,value[26]={0},count=0;
for(i=0;str[i]!='\0';i++)
{
if('a'<=str[i] && str[i]<='z')
{
count+=!value[str[i]-'a'];
value[str[i]-'a']=1;
}
else if('A'<=str[i] && str[i]<='Z')
{
count+=!value[str[i]-'A'];
value[str[i]-'A']=1;
}
}
if(count==26)
{
printf("The String is a Pangram String.");
}
else
{
printf("The String is not a Pangram String.");
}
getch();
}
Thank you!
0
0
Are there any code examples left?
New code examples in category Other
-
Other 2023-03-27 22:50:10 how to select the whole line in vscode with keyboard shortcut
-
Other 2022-03-27 22:45:24 income of a web developer
-
Other 2022-03-27 22:35:01 \pyrcc_main.py: File does not exist 'resources.qrc'
-
Other 2022-03-27 22:30:45 rick roll embed code
-
Other 2022-03-27 22:20:08 Circuit_04_Potentiometer
-
Other 2022-03-27 22:20:05 iterative power
-
Other 2022-03-27 22:15:11 flutter run all
-
Other 2022-03-27 22:10:05 when is karlson release
-
Other 2022-03-27 22:10:02 wp .htaccess example
-
Other 2022-03-27 22:00:08 bash pause in file read line by line