OJ 2687: 用循环实现连续大写英文字母的输出

来源:互联网 发布:手机图片后期制作软件 编辑:程序博客网 时间:2024/05/16 19:16

Description

输入一个大写字母,用循环实现从该大写字母到最后一个大写字母Z的依次输出

Input

起始大写字母

Output

从该其实字母开始连续后续大写字母一直到大字字母Z

Sample Input

E

Sample Output

EFGHIJKLMNOPQRSTUVWXYZ

#include <iostream>#include <iomanip>#include <stdio.h>using namespace std;int main(){    int i;    char x;    scanf("%c",&x);    for(i=x;; i++)    {        printf("%c",x);        if(x=='Z')            break;        x=x+1;    }    return 0;}


阅读全文
0 0