Answers for "pangram program in c"

C
0

pangram program 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;
}
Posted by: Guest on June-29-2020

Code answers related to "C"

Browse Popular Code Answers by Language