Topic: 困扰着我啊!(满足ab+cd=dc的一位自然数)

  Print this page

1.困扰着我啊!(满足ab+cd=dc的一位自然数) Copy to clipboard
Posted by: top88222
Posted on: 2006-08-09 21:53

int a=1,b=2;
有什么办法可以用a,b表示出21呢?
并且可以用21计算.

2.Re:困扰着我啊!! [Re: top88222] Copy to clipboard
Posted by: why
Posted on: 2006-08-10 01:12

???
int ba = b * 10 + a;

請告訴大家閣下到底要做啥

3.Re:困扰着我啊!! [Re: top88222] Copy to clipboard
Posted by: top88222
Posted on: 2006-08-10 10:35

为了解决下面个问题.
求满足等式ab+cd=dc的所有a,b,c,d.且a,b.c.d必须为一位自然数.

4.Re:困扰着我啊!! [Re: top88222] Copy to clipboard
Posted by: why
Posted on: 2006-08-10 11:11


public class Abcd {

  public static void main(String[] args) {
    int a,b,c,d;
    
    for (a=1; a<9; a++) {
      for (b=0; b<9; b++) {
        for (c=0; c<9; c++) {
          for (d=0; d<9; d++) {
            if ((10*a+b + 10*c+d) == (10*d + c)) {
              System.out.println(a + "" + b + "+" + c + "" + d + "=" + d + "" + c);
            }
          }
        }
      }
    }
  }

}

5.Re:困扰着我啊!! [Re: top88222] Copy to clipboard
Posted by: top88222
Posted on: 2006-08-10 22:12

我第一次看人写的代码

6.Re:困扰着我啊!! [Re: top88222] Copy to clipboard
Posted by: top88222
Posted on: 2006-08-10 22:15

老哥,能不能给我个你的联系方式.
小弟,想拜你为师.

7.Re:困扰着我啊!! [Re: top88222] Copy to clipboard
Posted by: why
Posted on: 2006-08-11 08:53

為師特惠價:每小時50加元 Smile

否則少說甚麼拜師

8.Re:困扰着我啊!! [Re: why] Copy to clipboard
Posted by: zcjl
Posted on: 2006-08-11 10:17

why wrote:
為師特惠價:每小時50加元 Smile

否則少說甚麼拜師

果然是特惠价 Smile

9.Re:困扰着我啊!! [Re: why] Copy to clipboard
Posted by: cxp108
Posted on: 2006-08-11 11:51

why wrote:
為師特惠價:每小時50加元 Smile

否則少說甚麼拜師

教育乱收费,哈哈Big SmileBig Smile

10.Re:困扰着我啊!! [Re: top88222] Copy to clipboard
Posted by: top88222
Posted on: 2006-08-11 14:24

你打算怎么教学啊?
老师,我给你斟茶了.

11.Re:困扰着我啊!! [Re: top88222] Copy to clipboard
Posted by: why
Posted on: 2006-08-11 18:38

top88222 wrote:
你打算怎么教学啊?
老师,我给你斟茶了.

Dead
先收50小時教學費才好說

閣下拜師隨便
敝人收費卻絕不含糊

請看看敝人在 http://www.cjsdn.net/post/view?bid=32&id=168166 怎麼說:
為人師是一大責任,這裡的朋友對閣下並無半點認識,為何要負這責任?恐怕半個道理也找不著
如果只是隨口說說,所謂拜師豈不是鬧劇而已

才管閣下真誠與否,有問題就提出來,有意見心得就交流一下

廢話少說吧

12.Re:困扰着我啊!! [Re: top88222] Copy to clipboard
Posted by: top88222
Posted on: 2006-08-11 21:59

老师,你好。
打今儿起,我就跟着你了。
徒弟出身贫寒,还望你多多包容。

13.Re:困扰着我啊!! [Re: top88222] Copy to clipboard
Posted by: top88222
Posted on: 2006-08-11 22:02

明白你的意思了。我踏实地学下去的。

14.Re:困扰着我啊!! [Re: top88222] Copy to clipboard
Posted by: why
Posted on: 2006-08-12 00:34

top88222 wrote:
老师,你好。
打今儿起,我就跟着你了。
徒弟出身贫寒,还望你多多包容。

看見老师的稱呼便心緒不寧
以後看見便閃
閣下好自為之

當然,付老師費就是另一回事Wink


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923