#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void Swap(int*str1, int*str2)
{
int tmp = *str1;
*str1 = *str2;
*str2 = tmp;
}
int main()
{
int a = 0;
int b = 0;
scanf("%d%d", &a, &b);
Swap(&a, &b);
printf("a=%d b=%d\n", a, b);
getchar();
getchar();
}
写一个函数,交换整形变量的内容
猜你喜欢
转载自blog.csdn.net/m0_55890292/article/details/121327605
今日推荐
周排行