为什么不对

P5705 【深基2.例7】数字反转

djvu @ 2023-08-04 18:35:39

#include<stdio.h>
int main()
{
    char a, b, c, d;
    scanf("%c%c%c.%c", &a, &b, &c,&d);
    printf("%c%c%c.%c", d, c, b, a);
    return 0;
}

by zhanghaosong @ 2023-08-04 18:38:24

应该是

printf("%c.%c%c%c", d, c, b, a);

by Bingxiu @ 2023-08-04 18:39:12

@Zmfyxdrs18 输出格式错了


by 初星逝者 @ 2023-08-04 18:39:39

@Zmfyxdrs18


by djvu @ 2023-08-04 19:07:44

@zhanghaosong 多谢


|