1 条题解

  • 0
    @ 2025-4-7 21:29:26

    C :

    #include <stdio.h>
    #include <stdlib.h>
    #define swap(a,b) t=a;a=b;b=t;
    int main(int argc, char *argv[])
    {
      int a,b,t;
      scanf("%d%d",&a,&b);
      swap(a,b);
      printf("%d %d",a,b);
    
      return 0;
    }
    
    

    C++ :

    #include<iostream>
    using namespace std;
    int main()
    {
    int a,b;
    cin>>a>>b;
    cout<<b<<" "<<a<<endl;
    }
    

    Pascal :

    var a,b:integer;
    begin
      readln(a,b);
      write(b,' ',a);
    end.
    
    • 1

    C语言程序设计教程(第三版)课后习题9.1

    信息

    ID
    1520
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者