#include <stdio.h> #include <stdlib.h> int main() { int a, b; int change_num(int a, int b);//声明change_num函数 printf("please enter two numbers:"); scanf("%d,%d", &a, &b); change_num(&a,&b);//调用change_num函数 printf("%d %dn", a, b); system("pause"); return 0; } int change_num(int *px, int *py)//定义change_num函数 { int temp; temp = *px; *px = *py; *py = temp; }
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/c-cdevelopment/606560.html