Feed Headline Animator

WAP to read a sentence and count a specific letter (LOOP)

Main()
{
char s[30],ch;
int c,l,t=0;
printf(“Enter letter to counted\n”);
ch =getche();
l = strlen( s);
for(i=0 ;i<=l ;I ++)
{
if(s[i] = =c)
t++;
}
printf(“%c comes %d times “,ch ,t);
}


Posted by: Wasim Javed

No comments:

Post a Comment