全字母句

全字母句
Time Limit: 1000MS Memory Limit: 65536KB
Problem Description

全字母句 (pangram) 指包含字母表中全部 26 种英文字母(不区分大小写)的句子,其常被用于展示英文字体的显示效果。

现在,bLue 得到了很多句子,他想知道哪些句子是全字母句。
Input

输入数据有多组(数据组数不超过 100),到 EOF 结束。

每组数据包含一行长度不超过 100 的字符串。
Output

对于每组数据,输出一行。

如果是全字母句则输出 “Yes”,否则输出 “No”(不包括引号)。
Example Input

The quick brown fox jumps over the lazy dog.
The 6th ACM Funny Programming For/While Contest

Example Output

Yes
No

Hint
Author
【第六届ACM趣味编程循环赛 Round #3】bLue

#include
#include
#include
int main()
{
    char a[1009];

    int i,len1;
    while(gets(a))
    {
        int c[150] = {0};//初始化标记数组
        len1 = strlen(a);
        for(i = 0; i < len1; i++)
        {
            if(a[i] >= 'a' &&a[i] <= 'z')
            {
                a[i] = a[i] - 32;
            }
            if(a[i] >= 'A' && a[i] <= 'Z')
            {
                c[a[i]]++;
            }

        }
        int flag = 0;
        for(i = 65; i <= 90; i++)
        {
            if(c[(char)i]==0)//把i转化为char类型
            {
                flag = 1;
                break;
            }
        }
        if(flag==0)printf("Yes\n");
        else printf("No\n");
    }
    return 0;
}

你可能感兴趣的:(全字母句)