浮点型数据类型存储空间大小 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ float a; double b; printf("%d %d",sizeof(a),siz…… 题解列表 2023年06月10日 0 点赞 2 评论 1035 浏览 评分:9.9
编写题解 2936: 简单算术表达式求值(C++) 摘要:解题思路:使用switch参考代码:#include<bits/stdc++.h>using namespace std;int main(){ char ch; int a,b; …… 题解列表 2023年06月10日 0 点赞 0 评论 404 浏览 评分:9.9
1002:[编程入门]三个数最大值 摘要:解题思路: o=(a+b+abs(a-b))/2; nums=(o+c+abs(o-c))/2;求最值的式子,熟练了也可以用于数组求最值注意事项:一定要说注意的地方在哪的话,定义的数据类型算一个吧,l…… 题解列表 2023年06月10日 0 点赞 0 评论 303 浏览 评分:9.9
自定义函数之字符串连接 摘要:解题思路:可以直接使用strcat函数来实现连接功能注意事项:注意gets函数要使用两次参考代码:#include<stdio.h>#include<string.h>int main(){ c…… 题解列表 2023年06月10日 0 点赞 0 评论 309 浏览 评分:9.9
二级C语言-平均值计算 摘要:参考代码:#include <bits/stdc++.h>using namespace std;int main(int argc, char** argv) { int a,b,c,d,e,…… 题解列表 2023年06月11日 0 点赞 0 评论 446 浏览 评分:9.9
信息学奥赛一本通T1181-整数奇偶排序 摘要:解题思路:通过设置3个数组,用for循环分别录入,计算相应奇偶数数量,输出。使用冒泡法进行排序。注意事项:参考代码:#include <stdio.h>int main(){ int a[10]…… 题解列表 2023年06月12日 0 点赞 2 评论 341 浏览 评分:9.9
c语言代码解决问题 摘要:解题思路:1. 使用哈希表:可以使用哈希表来存储数组元素及其对应的索引,以减少查找的时间复杂度。在内层循环中,可以通过查询哈希表来找到与当前元素配对的另一个元素,而不需要遍历整个数组。2.排序数组:如…… 题解列表 2023年06月13日 0 点赞 0 评论 272 浏览 评分:9.9
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,num; float consume = 0; scanf("%d", &n); …… 题解列表 2023年06月13日 0 点赞 0 评论 425 浏览 评分:9.9
图·一乐 摘要:解题思路:注意事项:纯属享受sort的便利参考代码:#include<iostream>#include<algorithm>using namespace std;int main(){ in…… 题解列表 2023年06月15日 0 点赞 0 评论 268 浏览 评分:9.9
更适合c++的奇偶排序 摘要:解题思路:两个数组,一个存储,一个变化注意事项:参考代码:#include <iostream>#include <algorithm>using namespace std;int main() {…… 题解列表 2023年06月15日 0 点赞 0 评论 310 浏览 评分:9.9