Java 如何获取矩形的面积
矩形的面积
矩形的面积可以通过将矩形的长度乘以宽度来求得。
示例
int length = 5;
int width = 2;
int area = length * width;
System.out.println("Area of rectangle: " + area);
自己尝试 »
矩形的面积可以通过将矩形的长度乘以宽度来求得。
int length = 5;
int width = 2;
int area = length * width;
System.out.println("Area of rectangle: " + area);
自己尝试 »
If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]
If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]