程序分析,给出运算结果.

学习 时间:2026-06-05 18:34:01 阅读:7375
程序分析,给出运算结果.#include \x05class Sample\x05{\x05int x;public:\x05Sample(int a){ x = a; }friend double square(Sample & s);\x05};double square(Sample & s){ return s.x*s.x; }\x05void main()\x05{\x05Sample s1(20);\x05Sample s2(30);\x05cout

最佳回答

纯情的小土豆

孝顺的故事

2026-06-05 18:34:01

s1。square=400
s2。square=900
再问: 准确吧?考试题啊~~
再答: 准确

最新回答共有2条回答

  • 诚心的发夹
    回复
    2026-06-05 18:34:01

    s1。square=400s2。square=900 再问: 准确吧?考试题啊~~ 再答: 准确

上一篇 安装有12只不锈钢水下灯、8只地埋灯

下一篇 鹰卫浴智能马桶