正经题解
2025-08-29 16:57:02
发布于:江西
2阅读
0回复
0点赞
面向结果编程
#include<bits/stdc++.h>
using namespace std;
int main() {
cout << "张三" << " "
<< 98.5 << " "
<< 12;
return 0;
}
vs
面向对象编程
#include <bits/stdc++.h>
using namespace std;
struct stu {
string name;
double score;
int age;
};
int main() {
stu a;
a.name = "张三";
a.score = 98.5;
a.age = 12;
cout << a.name << " "
<< a.score << " "
<< a.age;
return 0;
}
这里空空如也
有帮助,赞一个