1
0
forked from newde/homework

镇乃天子

This commit is contained in:
2026-03-07 05:16:06 -05:00
parent 7aecf0da37
commit 9fdfe16b58
5 changed files with 85 additions and 0 deletions

18
666/交换3.cpp Normal file
View File

@@ -0,0 +1,18 @@
#include<iostream>
using namespace std;
int main(){
int a=25,b=32,tmp;
int *ptr_a, *ptr_b;
ptr_a=&a;
ptr_b=&b;
cout<<*ptr_a<<" "<<*ptr_b<<" ";
cout<<ptr_a<<" "<<ptr_b<<" ";
tmp=*ptr_a;
*ptr_a=*ptr_b;
*ptr_b=tmp;
cout<<a<<" "<<b<<endl;
return 0;
}