C语言实验——三个数排序

#include <stdio.h>
int main()
{
    int x, y, z, t;
    scanf("%d,%d,%d",&x, &y, &z);
    if(x > y)
    {
        t = x;
        x = y;
        y = t;
    }
    if(x > z)
    {
        t = x;
        x = z;
        z = t;
    }
    if(y > z)
    {
        t = y;
        y = z;
        z = t;
    }
    printf("%d %d %d", x, y, z);
    return 0;
}


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2021-11-04
  • 2021-06-18
  • 2021-09-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
  • 2021-11-27
  • 2021-05-18
  • 2021-12-24
相关资源
相似解决方案