watermelon.cpp

来自「两个小游戏----王婆卖瓜和石头剪子布」· C++ 代码 · 共 24 行

CPP
24 行
字号
#include<iostream.h>
#include"watermelon.h"


void watermelon::display()    //
{
	cout<<"The watermelon weight is: ";
	cout<<weight<<endl;
}

 void watermelon::total_disp()  //
{
	cout<<"Total weight is: ";
	cout<<total_weight<<endl;


	cout<<"Total number is: "
	<<total_number<<endl;


}

float watermelon::total_weight=0;  //
int watermelon::total_number =0;   //

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?