Again as I suggested if I've got two integers and I want to find common divisors I could take those two lists and walk through them.
我还要说如果我们有了两个整数,并且想求两者的公因数的话我,可以把这两个整数的。
Right, It's just squaring an integer, is what it's doing.
对了,这个程序就是,用来求一个整数的平方的。
I'm given an integer that's a perfect square, and I want to write a little piece of code that's going to find the square root of it. All right so I'm cheating a little, I know it's a perfect square, somebody's given it to me, we'll come back in a second to generalizing it, so what would the steps be that I'd use to walk through it?
完美平方数的整数,我想写一段代码来求这个数的平方根,好,我这儿有点儿作弊了,我知道这是一个完美的平方数了,他们给我的,我们后面会讲怎么产生这个数的,那么我想解决这个问题,需要什么步骤呢?
应用推荐