题解列表

筛选

C++函数重载练习

摘要:# C++ 函数重载 > 重载`Compare`函数 ```c++ int Compare(int a, int b) { return a > b ? a : b; } int……

有规律的数列求和简单求解

摘要:解题思路:观察分子分母变化规律,选取了一个简单的实现方法,设置初始变量分子为2,初始分母为1,数列首相an=2/1,在循环中,把分子分母的变化规律用相应的代码实现,用临时变量t=分子,分子等于原来分子……

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){    double xa, xb, ya, yb,distance,length……

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>#include<math.h>int compare(const void* a, const v……

c语言代码解决问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str[33]; gets(str); str[strlen(st……