944,160 Members | Top Members by Rank

Ad:
Oct 2nd, 2009
-1

Containing numbers - how?

Expand Post »
Hello guys and girls.

Any idea how to find containing numbers of one specific number. For example number 10:

10 = 9+1
10 = 8+2
10 = 7+3



I tried to do something like ‘random(10)’ but got nowhere with that.

Cheers to all,
marygreen
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
marygreen is offline Offline
8 posts
since Sep 2009
Oct 2nd, 2009
0

Re: Containing numbers - how?


10 = 9+1
10 = 8+2
10 = 7+3


Where do you want to search?Where do you store them,in string?
Reputation Points: 132
Solved Threads: 138
Posting Pro
FlamingClaw is offline Offline
559 posts
since Feb 2009
Oct 2nd, 2009
0

Re: Containing numbers - how?

Hi FalmingClaw.

Need to generate them and print them in a memo.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
marygreen is offline Offline
8 posts
since Sep 2009
Oct 3rd, 2009
0

Re: Containing numbers - how?

Never mind. I did it this way:

Pascal and Delphi Syntax (Toggle Plain Text)
  1. begin
  2. C.value:=10;
  3. while num1.value<c.value do
  4. begin
  5. num1.value:=num1.value+1;
  6. num2.value:=c.value-num1.value;
  7. memo1.lines.add((floattostr(num1.value))+'__'+(floattostr(num2.value)));
  8. end;
  9. if (num1.value=c.Value) then
  10. begin
  11. showmessage('Done');
  12. end;
  13. end;
Reputation Points: 10
Solved Threads: 0
Newbie Poster
marygreen is offline Offline
8 posts
since Sep 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Pascal and Delphi Forum Timeline: What is wrong of my program?
Next Thread in Pascal and Delphi Forum Timeline: delphi logon code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC