#include<stdio.h>
#include<stdlib.h>
void exchang(double *m,double *n){
double temp;
temp=*m;
*m=*n;
*n=temp;
}
int main(){
double a,b;
printf("Enter two integer:");
scanf("%lf %lf",&a,&b);
printf("a:%f b:%f\n",a,b);
exchang(&a,&b);
printf("a:%f b:%f\n",a,b);
system("pause");
return 0;
}
沒有留言:
張貼留言