Navigation

    GitHub中文社区
    • GitHub排行榜

    论坛

    • Login
    • Categories
    • Recent
    • Tags
    • Popular

    三个数从大到小依次输出

    技术交流
    1
    1
    116
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 150930
      150930 last edited by

      #include<stdio.h>
      int main()
      {int a,b,c,k;
      scanf("%d %d %d",&a,&b,&c);
      if(b>a)
      {
      k=b;
      b=a;
      a=k;}
      if(c>b)
      {k=c;
      c=b;
      b=k;

      }
      if(a<c)
      k=c;
      c=b;
      b=a;
      a=c;
      printf("%d %d %d",a,b,c);
      return 0;
      }

      1 Reply Last reply Reply Quote 0
      • First post
        Last post