输入一行字符,字符最多30个,输出的结果按其ASCII码值由小到大的顺序排列。例如:输入:afc,输出:acf...

展开全部
收起
6回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • Asha

    20人对此回答表示赞同

    #include <stdio.h>

    void main()
    {
    char x[30],t;
    int i,j;
    printf("请输入字符:");
    scanf("%s",x);
    for(i=0;i<30;i++)
    {
    if(x[i]=='\0')
    break;
    f
    展开
    20
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • Jameson

    16人对此回答表示赞同

    //VC下编译通过,运行正常
    #include <stdio.h>

    void sort(char str[])
    {
    char *p, *q, *r, c;
    for(p=str; *p; p++)
    {
    for(q=r=p; *q; q++)
    if(*r > *q) r = q;
    if(r != q)
    {
    c = *r;
    展开
    16
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • 亚当思密达

    11人对此回答表示赞同

    简洁,明了,高效:
    #include"stdio.h"
    #define N 30
    queue(char a[N])
    {
    int i,j;
    char t;
    for(i=0;*(a+i)!='\0';i++)
    {
    for(j=i+1;*(a+j)!='\0';j++)
    if(*(a+i)>*(a+j))
    展开
    11
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • 牛油果

    5人对此回答表示赞同

    输入一行字符,允许空白等符号,排队输出。

    #include <stdio.h>
    void main(void)
    {
    char str[100];
    int i,j,len,k;

    printf("enter one line string\n");
    fgets(str,99,stdin);
    len = strlen(str);
    len=len-1;
    展开
    5
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • 火山飞灰

    5人对此回答表示赞同

    #include <stdio.h>
    #include <string.h>
    int main(void)
    {
    char ch;
    char s[30];
    int i,j;
    int len;

    printf("Enter a string: \n");
    scanf("%s",s);
    len=strlen(s);
    展开
    5
    0回复
    发布于 6年前

    评论(0)

    收起评论

  • 何入舟

    3人对此回答表示赞同

    //这个程序是在VC6.0中测试通过.
    #include<stdio.h>
    #include<string.h>
    #define MAX 30

    typedef int KeyType;
    typedef char ElemType[10];
    typedef struct
    {
    KeyType key;
    ElemType data;
    }SqList;

    展开
    3
    0回复
    发布于 6年前

    评论(0)

    收起评论

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部