Codecodify
Codecodify
全部文章
题解
归档
标签
去牛客网
登录
/
注册
Codecodify的博客
全部文章
/ 题解
(共49篇)
题解 | #温度转换#
#include <stdio.h> int main() { float f; scanf("%f", &f); printf("%.3f\n", 5.0 / 9 * (f - 32)); return 0; }
C
C++
2023-04-15
0
233
题解 | #平方根#
#include <stdio.h> #include <math.h> int main() { int num; scanf("%d", &num); printf("%d\n", (int) floor(sqrt(num)))...
C
C++
2023-04-15
0
226
题解 | #求平均值#
#include <stdio.h> #define Size 3 double average(int nums[], int size) { double total = 0; for(int i = 0; i < size; i++) { t...
C
C++
2023-04-15
0
274
题解 | #牛牛学立体#
使用面向对象思想 #include <iostream> using namespace std; // 声明一个体积抽象接口 class Volume{ // 求表面积 virtual int surface() = 0; // 求体积 ...
C++
2023-04-15
0
311
题解 | #牛牛学矩形#
面向对象思想 #include <iostream> using namespace std; class Rectangle { public: Rectangle(int width, int height): _width(width), _height(...
C++
2023-04-15
0
288
题解 | #牛牛学圆#
使用面向对象思想 #include <iostream> #include <iomanip> #define PI 3.14159 using namespace std; class Circle { public: Circle(double...
C++
2023-04-14
0
284
题解 | #牛牛学梯形#
使用面向对象思想来实现 #include <iostream> #include <iomanip> using namespace std; class Trapezia { public: Trapezia(float up, float do...
C++
2023-04-13
0
307
题解 | #分钟计算#
#include <iostream> #define Size 2 using namespace std; typedef struct { int hour; // 小时 int minutes; // 分钟 int total; // 总分钟 } Cl...
C++
数组
2023-04-13
0
250
题解 | #整数的个位#
#include <iostream> using namespace std; int counting(int num) { if(num >= 10) { num = num - (num / 10 * 10); } return n...
C++
2023-04-13
0
212
首页
上一页
1
2
3
4
5
下一页
末页