【发布时间】:2014-02-27 22:06:59
【问题描述】:
#include <iostream>
int main()
{
using std::cout;
using std::endl;
using std::cin;
short width;
short legnth;
short height;
short volume;
volume = (legnth * width * height);
cout << "This program will determine the volume of a cube" << endl;
cout << "Enter the legnth of the cube: ";
cin >> legnth >> endl;
cout << "Enter the width of the cube: ";
cin >> width >> endl;
cout << "Enter the height of the cube: ";
cout << "Your volume is: " << volume;
cout << "Press any key to exit :)";
cin.get();
return 0;
我是 C++ 新手,在我的基本计算机编程课程中,我们必须做一些可以计算体积的东西,有人可以帮我解决这个错误吗?
}
【问题讨论】:
标签: c++