We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
#include<math.h>#include<stdio.h>#include<string.h>#include<stdlib.h>#include<assert.h>#include<limits.h>#include<stdbool.h>intmain(){/* Enter your code here. Read input from STDIN. Print output to STDOUT */chars[1000];scanf("%[^\n]%*c",s);intlen=strlen(s);inta[26]={0};for(inti=0;i<len;i++){if(s[i]>=65&&s[i]<=90){intj=s[i];a[j-65]++;}if(s[i]>=97&&s[i]<=122){intk=s[i];a[k-97]++;}}intcount=0;for(inti=0;i<26;i++){if(a[i]>0)count++;}if(count==26)printf("pangram");elseprintf("not pangram");return0;}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Pangrams
You are viewing a single comment's thread. Return to all comments →
Easy solution in c...