An Alphabetical Program. It tells you if the string(user inputed) is having all the alphabets or not.
Ask this program for it.It works for no. of T cases So You must tell the compiler the no. of casses you want to apply.
#include<iostream.h>
#include<stdio.h>
#include<string.h>
int main()
{
int N;
char ch[100], r[25];
int j=0, s=0, count=0, a[100];
cin>>N;
for(int i=65;i<91;i++)
r[j++]=char(i);
while(N)
{
gets(ch);
for(i=0;i<=strlen(ch);i++)
{
for(j=0;j<26;j++)
if(ch[i]==r[j]){
++i;
++j;
++count;
}
}
if(count==25)
a[s++]=1;
else
a[s++]=0;
count=0;
--N;
}
for(i=0;i<s;i++)
if(a[i]==0)
cout<<"No\n";
else
cout<<"Yes\n";
cout<<r;
}
No comments:
Post a Comment