第二次作业

#include<stdio.h>
#include<stdlib.h>
int main()
{
    void swap(int *p,int *q);
    int a,b;
    int *p,*q;
    scanf("%d ,%d",&a,&b);
    p=&a;
    q=&b;
    swap(p,q);
    printf("%d,%d",a,b);
    system("pause"); 
 }
 swap(int *p,int *q)
 {int temp; 
  temp=*p;
 *p=*q; 
 *q=temp; 
 }
 
 按书上的改的,总结到底怎么写啊,求老师点拨

 

posted @ 2017-03-22 17:50  我不信这名字有  阅读(88)  评论(0)    收藏  举报