三个数交换(函数)

Kinghero King of the summit 2022-08-14 20:03:13 2023-08-29 13:30:43 0
   #include <iostream>
    using namespace std;
    int change(int &a,int &b,int &c)
    {
	    int A;
	    A = a;
	    a = b;
	    b = c;
	    c = A;
    }
    int main()
    {
	    int a,b,c;
	    cin>>a>>b>>c;
	    change(a,b,c);
	    cout<<a<<" "<<b<<" "<<c;
	    return 0;
    } 
{{ vote && vote.total.up }}