Re: c++ 求平方 我解不出來

看板Programming作者時間18年前 (2006/11/10 13:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/6 (看更多)
※ 引述《jiannrong@kkcity.com.tw ( )》之銘言: > #include<iostream> > #include<cmath> > using namespace std; > void is_square(int num); int 改 double > int main() > { > int num; int 改 double > cout << "請輸入一個數字"; > cin >> num; > cout << num << " is "; > is_square(num); > system("PAUSE"); > return 0; > } 好像前面回答的板友都還沒修正這些部分, 所以幫忙補一下, 不然輸入像是 6.25 之類的東西會不正確。 -- Name: Tseng, Ling-hua E-mail Address: uranus@it.muds.net School: National Tsing Hua University Department: Computer Science Interesting: C++, Compiler, PL/PD, OS, VM, Large-scale software design Researching: Undecided Homepage: https://it.muds.net/~uranus -- ╔═══╗ ┼────────────────────────╮ 狂狷 Origin:[ 狂 狷 年 少 ] whshs.cs.nccu.edu.tw ╰─╮ 年少 ┼╮ < IP:140.119.164.252 > ╰─╮ ╚╦═╦╝ From:61-230-234-91.dynamic.hinet.net ─╨─╨─ KGBBS 遨翔"BBS"的狂狷不馴;屬於年少的輕狂色彩
文章代碼(AID): #15L0xL00 (Programming)
文章代碼(AID): #15L0xL00 (Programming)