![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
Rihaong_yyy
游走在技术牛了个大贝的边缘
展开
-
C++中使用构造函数初始化对象
#include<iostream>#include<string>using namespace std;class GradeBook{public: // constructor explicit GradeBook(string name) :courseName(name) // initialize courseName { //empty body } void setCourseN.原创 2021-02-12 11:17:31 · 239 阅读 · 0 评论 -
【C++】求三个数的最值
//Calculate the largest and smallest of three integers.#include<iostream>using namespace std;int main(){ // 1.Max(1) int a,b,c,m; cout << "Please enter three integers: "; cin >> a >> b >> c; if(a >原创 2021-02-10 20:28:07 · 1141 阅读 · 0 评论 -
【C++】求三个数的和、平均值、乘积、最小值、最大值
//Calculate sum,average,product,smallest and largest of three integers.#include<iostream>int main(){ int x,y,z,sum,average,product,smallest,largest; std::cout << "Please enter three integers: "; std::cin >> x >> y &.原创 2021-02-10 20:01:21 · 5680 阅读 · 6 评论