how to print sentaence is pangram or not i m getting Timeout in c

I have to find sentences is pangram(Pangrams are sentences constructed by using every letter of the alphabet at least once) or not

Terminated due to timeout in c for my code. why i seems ok to me why not ? how thinks work . i m using it in hackerrank . they limitation but dn’t know limit and

plz tell me better ways to solve with logical reasoning. THis is too much i think plz help 🙂

this is best what i can do plz help me .. thanks in advance and if something bige mistake in program sorry 🙂

int main() {

int i,j,n=0,l;
char str[1000];

scanf("%[^n]%*c",str);

for(l=65;i<91;l++)
{
    for(i=0;str[i]!='{$content}';)

{
    if(l==str[i]&&l+31==str[i])

        n++;


 if(str[i+1]=='{$content}')
     {  i=i+2; 

     }
   else
       i++;

   }  
 }



 if(n==26)  
   printf("pangram ");
else
     printf(" not pangram ");

   return 0;

}


Source: c#

Leave a Reply