题解列表

筛选

C语言训练-"水仙花数"问题2

摘要:解题思路:分别求各个位数的数字,再分别求立方,最后加起来的和看是否与给定的值相等注意事项:求百位:num/100;               求十位:num/10%10;              ……

c语言利润计算

摘要:解题思路:分支(小白适用)注意事项:各个分段之间的练习参考代码:#include<stdio.h>int main() { int sal=0; int I; scanf("%d",&I); if(I……

就要和别人不一样

摘要:解题思路:如果没完没了怎么办?我们构造一个函数,一个名为 `run` 的函数。创建了一个列表 `ranges`,其中包含了多个元组。每个元组包含两个值,第一个值是利润上限 `limit`,第二个值是对……

字符串连接

摘要:```cpp #include using namespace std; int main() { string s,t; getline(cin,s); getline(……

字符大法好

摘要:解题思路:用字符串一个一个取出来注意事项:特别注意就是别想复杂了,一般数学取数字问题多多考虑字符串参考代码:#include <iostream>#include <stdio.h>using nam……

一种利用switch_case特性的巧妙解法

摘要:# 一种利用switch_case特性的巧妙解法——减少代码量 ## 传统写法 各种写法很多,这儿提供一种典型的: ```c #include int main() { int ……

2918:成绩排序

摘要:```c #include #include typedef struct student { char name[25]; int score; }student; int ma……