0 喜歡 0 不喜歡
128 瀏覽

Suppose we have the following two points in a 3D space:

The distance between point1 and point2 is:

Please create a ThreeD class to calculate the distance between two 3D points.

請宣告ThreeD類別來算出兩個3D點的距離。

Hint:

  • Write three public functions to Point class to get the value of X, Y, and Z
  • 建立三個public函數為讀取X,Y,Z的值

Example input:

1 1 1
2 3 4

Example output:

Distance is: 3.74166
[正常] Coding (C++) - 最新提問 分類:Introduction to Computer Programming II (C++) | 用戶: (9.9k 分)
ID: 52068 - 從幾時開始: 無限制 - 到幾時結束: 無限制
| 128 瀏覽
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.6.12
©2016-2024

相關問題

0 喜歡 0 不喜歡
0 回答
[正常] Coding (C++) - 最新提問 5月 17, 2018 分類:Introduction to Computer Programming II (C++) |
ID: 52070 - 從幾時開始: 2018-04-26 17:48 - 到幾時結束: 無限制
| 126 瀏覽
12,783 問題
183,443 回答
172,219 留言
4,824 用戶