Thread: Connecting intervals together

  1. #1
    Registered User kaspari22's Avatar
    Join Date
    Jul 2008
    Location
    Czech Republic, Doubravice
    Posts
    14

    Connecting intervals together

    Hello,

    I have one little problem. How connect integer together?

    example:

    int n = 1
    int m = 1
    int k = 1

    result = n + m + k //but result should be 111 not 3(also keep it like integer)

    little trick but not working for me... thanks for help))
    Last edited by kaspari22; 06-24-2011 at 08:17 AM.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    I don't know what you mean by "keep it like interval" (EDIT: unless you mean integer instead). As to how to build 111, ask yourself: what does the first 1 mean, what does the second 1 mean, and what does the third 1 mean?

  3. #3
    Registered User kaspari22's Avatar
    Join Date
    Jul 2008
    Location
    Czech Republic, Doubravice
    Posts
    14
    Sorry my mistake all of them should be Integer...

  4. #4
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    are all these numbers <10?

    if not, what is the desired output then?

  5. #5
    Registered User kaspari22's Avatar
    Join Date
    Jul 2008
    Location
    Czech Republic, Doubravice
    Posts
    14
    Yes it should be only one type 0-9 so <10

  6. #6
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    here's a hint:

    100 +
    010 +
    001

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 04-26-2011, 01:42 AM
  2. Connecting through a proxy...
    By jverkoey in forum Networking/Device Communication
    Replies: 1
    Last Post: 07-20-2005, 11:53 AM
  3. Connecting With IP
    By Phanster in forum C++ Programming
    Replies: 13
    Last Post: 10-20-2004, 08:01 PM
  4. Connecting to a FTP with C#???
    By gicio in forum C# Programming
    Replies: 3
    Last Post: 12-12-2002, 05:10 PM