Input-Output Practice小结 摘要:@1限定个数的加法#include<stdio.h>int main(){ int n; scanf("%d",&n); //优势:有效求解限定个数的加法,效率高 int a[100],b[100…… 文章列表 2022年10月23日 0 点赞 0 评论 103 浏览 评分:9.9
A+B for Input-Output Practice 小结2 摘要:加法输入可以分为有结束标志型和无结束标志型也可分为 确定长度型和无确定长度型 也有特殊 既无结束标志也无确定长度#include<stdio.h>int main(){…… 文章列表 2022年10月24日 0 点赞 0 评论 190 浏览 评分:9.9
sort()函数用法(较常用) 摘要:(一)sort()是C++一种排序方法之一,并且执行效率较高;(二)sort()用法*头文件#include<algorithm>(1)sort(start,end);int a[4]={1,2,3,…… 文章列表 2022年10月27日 0 点赞 0 评论 218 浏览 评分:9.9
<algorithm>常用函数 摘要:(1)max(a,b) //最大值(2) min(a,b) //最小值(3) abs() //绝对值(整形)(4) fabs() //绝对值,(可以用浮点)…… 文章列表 2022年10月27日 0 点赞 1 评论 98 浏览 评分:9.9
二分查找-主函数,自定义函数。 摘要:# 二分查找 即对于一个有序的一维数组,查找数组中某一个元素的方法。 本部分分为两部分; 1.主函数的二分查找; )1定义一个数组arr[]={0,1,2,3,4,5,6,7,8,9}…… 文章列表 2022年10月29日 0 点赞 0 评论 154 浏览 评分:9.9
字符串常用输入方法(C++) 摘要:(1)cin>>char s[20]; cin>>s;遇到空格,tab,回车都会结束(2)cin.get()char ch; ch=cin.get(); cin.get(); //可以用来吃…… 文章列表 2022年10月31日 0 点赞 0 评论 164 浏览 评分:9.9
算法图解 分享 摘要:#####本书示例丰富,图文并茂,以让人容易理解的方式阐释了算法,旨在帮助程序员在日常项目中更好地发挥算法的能量。书中的前三章将帮助你打下基础,带你学习二分查找、大O表示法、两种基本的数据结构以及递归…… 文章列表 2022年11月03日 0 点赞 0 评论 175 浏览 评分:9.9
不使用string.h头文件计算字符长度 摘要:#include<stdio.h> #include<math.h> int main(void) { int num, count=0; scanf_s("%d", &num); …… 文章列表 2022年11月03日 0 点赞 0 评论 124 浏览 评分:9.9
幸运儿的单链表算法 摘要:#include<stdio.h>#include<malloc.h>#define MAX 50typedef struct test { struct test* next; int …… 文章列表 2022年11月06日 0 点赞 0 评论 267 浏览 评分:9.9
大数斐波那契数列 摘要:原题为洛谷p2437利用string的加法特性f[i]=f[i-1]+f[i-2]#include<bits/stdc++.h> using namespace std; string fb[10…… 文章列表 2022年11月12日 0 点赞 0 评论 172 浏览 评分:9.9