04

#include<iostream>
using namespace std;

void fun(int* a, int* b) {
    int x = *a;
    *a = *b;
    *b = x;
    cout << *a << *b << " ";
}
int main() {
    int x = 1, y = 2;
    fun(&x, &y);
    cout << x << y << endl;
    return 0;
}

 

posted @ 2022-03-08 20:20  行呗  阅读(103)  评论(0)    收藏  举报