三角形问题(3)

来源:互联网 发布:费雪淘宝旗舰店 编辑:程序博客网 时间:2024/06/10 16:24

问题及描述:

/* *copyright(c) 2014,烟台大学计算机学院 *All rights reserved *文件名称:test.cpp *作者:杨昊 *版本:v6.0 *时间;2016年4月7日 * *问题描述:三角形问题 *输入描述:无 *程序输出:*/#include<iostream>using namespace std;class Triangle{public: Triangle(int xx,int yy,int zz) {  x=xx;  y=yy;  z=zz; } void showMessage() {  cout<<x<<" "<<y<<" "<<z<<endl; }private: int x,y,z;};int main(){ Triangle Tri(7,8,9); Tri.showMessage();}

结果及总结:


0 0