题解 3000: 交换值(函数法)传址调用 解题思路:因为这里要对两个内存中的值进行操作,所以要传地址注意事项:参考代码:voidfun(int*pa,int*pb){inttmp=0;tmp=*pa;*pa=*pb;*pb=tmp;}intmain(){inta=0;intb=0;scanf("%d%d", 题解列表 2023年02月26日 0 点赞 0 评论 759 浏览 评分:9.9
交换值给个好评 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b; cin>>a>>b; cout<<b<<…… 题解列表 2023年11月21日 0 点赞 1 评论 538 浏览 评分:9.9
不用指针,简单写法 摘要:解题思路:一看就懂!注意事项:参考代码:#include <stdio.h>int main(){ int a, b; int c = 0; scanf_s("%d %d", &a, &b); c =…… 题解列表 2024年01月17日 0 点赞 0 评论 1111 浏览 评分:9.9
题解 3000: 交换值 摘要:解题思路:简单一点注意事项:参考代码: int a,b; scanf("%d %d",&a,&b); printf("%d %d",b,a); return 0;…… 题解列表 2024年11月01日 0 点赞 0 评论 977 浏览 评分:9.9
2000:交换值代码 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>void fun(int *p,int *q);int main(){ int m,n; …… 题解列表 2022年11月05日 0 点赞 0 评论 908 浏览 评分:9.3
交换值(超简单) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b; scanf("%d%d",&a,&b); printf("%d %d",b,…… 题解列表 2022年12月29日 0 点赞 1 评论 1038 浏览 评分:8.4
基础入门)交换值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b; scanf("%d%d",&a,&b); printf("%d %d",b,…… 题解列表 2022年11月20日 0 点赞 0 评论 720 浏览 评分:7.3
编写题解 3000: 交换值 摘要:解题思路:直接交换输出注意事项:参考代码:int a,b; scanf("%d %d",&a,&b); printf("%d %d",b,a);…… 题解列表 2022年11月14日 0 点赞 0 评论 599 浏览 评分:2.0
交换 a b 的值(不增加新的变量) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b; scanf("%d%d", &a, &b); a=a^b; b=a^b…… 题解列表 2023年02月05日 0 点赞 0 评论 630 浏览 评分:0.0
题目 3000: 交换值 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a = 0; int b = 0; int c = 0; scanf("%d %d", &a, &b);…… 题解列表 2023年02月26日 0 点赞 0 评论 492 浏览 评分:0.0