键盘上输入一个字母,从该字母开始顺序输出所有字母。就一点思路也没有,咋弄啊。怎么增加字母啊

img


键盘上输入一个字母,从该字母开始顺序输出所有字母。就一点思路也没有,咋弄啊。怎么增加字母啊

一种写法:

/******************************************************************************

                            Online C Compiler.
                Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <stdio.h>

int main()
{
   char c;
   printf("Enter character: ");
   c = getchar();
   if (c >= 'A' && c <= 'Z') {
       while (c<'Z')
           printf("%c", ++c);
   }
   
     if (c >= 'a' && c <= 'z') {
       while (c<'z')
           printf("%c", ++c);
   }
    return 0;
}