UOJ Logo

NOI.AC

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#171350#979. 指针填空题(1)heyuzhen1000ms1156kbC++305b2023-06-22 21:51:422023-06-22 21:51:43

answer

#include <bits/stdc++.h>
using namespace std;
#define ll long long
void Swap(int *a,int *b){
	int temp = *a;
	*a = *b;
	*b = temp;
}
int main(){
	int n=5,m = 8;
	Swap(&n,&m);
	cout << n << " " << m << endl;
	cout << "(1):*a=*b";
	cout << "(2):*b=temp";
	cout << "(3):&n,&m";
	return 0;
}

Details

小提示:点击横条可展开更详细的信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 1156kb

input:



output:

8 5
(1):*a=*b(2):*b=temp(3):&n,&m

result:

ok 2 lines