Making A Perfect Square 制造一个完美正方形
For all integers, is a perfect square.
对于每个整数,都是完全平方数。
The garden has flower beds that form a perfect square.
花园的花坛正好形成一个正方形。
Condensed into four 1.1 karats a perfect square diamond, and platinum to tell our engagement.
完美凝结成四颗1. 1克拉方钻,与铂金诉说着我们的约定。
I can check it, so if this was part of some other computation, I want to know, did it find a perfect square or not?
我可以检验它,因此如果这是其它计算的一部分我想知道,它能否找到一个完全平方根呢?
OK, once it gets to the end of that, what's it going to do? It's going to come down here and, oh. What's that doing? Well I cheated when I started. I said, somebody's giving me a perfect square, I'm looking for the square root of it. But suppose 15 I gave this thing 15, and asked it to run.
好,一旦到了循环的最后,程序会去做什么?程序会跳到这里来,噢,这是干什么的?好吧,当我开始的时候我有点小作弊的意思,我说过,我得到了一个完美的平方数,我要求这个数的平方根,但是假设下我得到的数是。
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?
完美平方数的整数,我想写一段代码来求这个数的平方根,好,我这儿有点儿作弊了,我知道这是一个完美的平方数了,他们给我的,我们后面会讲怎么产生这个数的,那么我想解决这个问题,需要什么步骤呢?
应用推荐