標題:
pow() 函式 - 計算冪次與開根號
[打印本頁]
作者:
李知易
時間:
2025-2-14 02:27
標題:
pow() 函式 - 計算冪次與開根號
利用pow() 函式, 設計一個可以輕鬆計算冪次與開根號的計算機.
#include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
int main()
{
double x, y;
cout<<"請輸入底數: ";
cin>>x;
cout<<"請輸入指數: ";
cin>>y;
cout<<x<<"的"<<y<<"次方,值為"<<pow(x,y)<<endl;
system("pause");
return 0;
}
複製代碼
作者:
朱立人
時間:
2025-2-14 21:56
此帖僅作者可見
作者:
洪睿輿
時間:
2025-2-15 10:30
此帖僅作者可見
作者:
鄭子宸
時間:
2025-2-15 16:19
此帖僅作者可見
作者:
張詠博
時間:
2025-2-16 10:14
此帖僅作者可見
作者:
江立辰
時間:
2025-2-16 16:04
此帖僅作者可見
作者:
楊昀瑾
時間:
2025-2-16 16:13
此帖僅作者可見
作者:
吳孟樵
時間:
2025-2-18 17:35
此帖僅作者可見
作者:
黃品錡
時間:
2025-2-19 19:26
此帖僅作者可見
作者:
陳頎諠
時間:
2025-2-19 19:52
此帖僅作者可見
作者:
彭郁程
時間:
2025-2-21 19:07
此帖僅作者可見
歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://seed.istak.org.tw/)
Powered by Discuz! 7.2