> 其他 >
编写过程实现交换两个整型变量a、b的值(例如a=5,b=6,交换后a=6,b=5)
人气:288 ℃ 时间:2020-05-25 06:06:30
解答
C 语言么?

直接编写一个函数,
viod exchange(a,b)
{
int t;
t=a;
a=b;
b=t;
}
就行了不是,是VB。Visual Basic......差不到哪儿去啊,你去看看VB怎么构造新函数不久行了么,剩下的一样啊亲 最主要真心不会! 能在打出来吗?Function exchange(a AS Integer,b AS Integer)dim t asInteger;t=a;a=b;b=t;End Function
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版