TOP

计算机二级考试C语言试题14
2011-09-20 13:25:18 来源: 作者: 【 】 浏览:182次 评论:0
微信搜索关注"91考试网"公众号,领30元,获取公务员、事业编、教师等考试资料40G!

3输入3个整数a,b,c,要求按大小顺序将它们输出。用函数实现改变这3个变量的值。

 

#include <stdio.h>

 

void main()

 

void  exchangeint *1 int *2 int *3;

 

   int   a,b,c,*1*2*3

 

  scanf(″%d,%d,%d″,&, &, &c);

 

 p1=&a;p2=&b;p3=&c;

 

  exchange (p1,p2,p3);

 

  printf(″\n%d,%d,%d\n″,,,c);

 

  

 

void  exchangeint *1 int *2 int *3

 

void  swapint *t1 int *t2;

 

     if*1*1 swap(q1,q2);

 

      if*1*3 swap(q1,q3);

 

      if*2*3 swap(q2,q3);

 

        

 

void  swapint *t1 int *t2

 

 int temp

 

     temp*pt1;

 

  *pt1=*pt2;

 

  *pt2=temp

 

  

 

Tags: 责任编辑:91kaoshiwang
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇计算机二级考试C语言试题15 下一篇计算机二级考试C语言试题13

相关栏目

最新文章

推荐文章

网站客服QQ: 960335752 - 14613519 - 48225117