热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_56863624
琉底骅网络
2 年前
trueweixin_56863624

春风拂面,花香弥漫,
绿叶婆娑,鸟语婉转。
诗意悠然,心情舒畅,
一切美好,在这里展现。

灌水乐园
CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
4.26(省略很多)#include<iostream>#include<bits/stdc++.h>using namespace std; class toy{ private: int number,price,total; public: toy(int x,int y) { number=y; price=x; total=price*number; } void final_money() { cout<<total<<endl; } }; int main(){ toy a[5]={toy(3,1240),toy(53,645),toy(198,30),toy(398,14),toy(569,5)}; int i; for(i=0;i<5;i++) { a[i].final_money(); } return 0;}
立即登录