Closed Thread
Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Please I need help to resolve this question

  1. #11
    bobdark's Avatar
    bobdark is offline Programmer
    Join Date
    Jan 2010
    Location
    Haifa, Israel
    Posts
    164
    Rep Power
    9

    Re: Please I need help to resolve this question

    umm the idea is to write an algorithm that calculates the wanted values and prints them. So why don't you start with writing a sequence of steps that the computer should perform in order to fullfill the given task? I will help give you a start:
    1) currentNumber=0
    2) print currentNumber^2
    ...
    finalStep: if currentNumber is 10 then do (___)
    else do (___)

    So go ahead and try to fill the (___) spots and the steps that are taken between 2) and the finalStep.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #12
    PINK is offline Newbie
    Join Date
    Mar 2010
    Posts
    10
    Rep Power
    0

    Re: Please I need help to resolve this question

    I don't know maybe it just need to print the table
    plz I realy need to heeeeeeeeeeeeeeeelp

  4. #13
    lthreed's Avatar
    lthreed is offline Newbie
    Join Date
    Mar 2010
    Posts
    18
    Rep Power
    0

    Re: Please I need help to resolve this question

    All I'll tell you is that tab is '\t'
    ('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#"`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@> Ah Malbolge

  5. #14
    PINK is offline Newbie
    Join Date
    Mar 2010
    Posts
    10
    Rep Power
    0

    Re: Please I need help to resolve this question

    okay I try it and the black screen was like this
    integer 1 2 3 4 5 6 7 8 9
    10 cube 1 4 9 16...-------------------------------------
    please I have 15 Minutes to do it
    I swear I will no ask again
    I'm in trouble help me

  6. #15
    PINK is offline Newbie
    Join Date
    Mar 2010
    Posts
    10
    Rep Power
    0

    Re: Please I need help to resolve this question

    I just want to know how I can print it in rows

  7. #16
    Join Date
    Jul 2009
    Location
    Santa Clarita, CA
    Posts
    2,111
    Blog Entries
    47
    Rep Power
    31

    Re: Please I need help to resolve this question

    All right... you need to write a function that does this generically, IE it performs the algorithmic work taking in user values. The function should be of this type signature:

    int getPower(int val, int exp)

    This function simply takes in a value as val, multiplies it by itself exp times, and returns the result. The main function (which should be int and not void) should have two nested loops, the first one to print out each line of values, the second to print out each returned value and tabulate as necessary. That's what you need, just write it out.

    Code:
    int getPower(int val, unsigned int exp)
    {
        // This function shoud return val to the power of exp, whatever exp is.
    }
    
    int main(void)
    {
        // All you need here is two for loops.
        for (int i = 1; /* Some kind of check to determine if to loop again */ ; ++i)
        {
            for (int j = 1; /* Again, you're on your own. */ ; ++j)
            {
                // A printf command that prints the value of getPower on i and j, and prints a tabulation.
            }
        }
    }
    Wow I changed my sig!

  8. #17
    PINK is offline Newbie
    Join Date
    Mar 2010
    Posts
    10
    Rep Power
    0

    Re: Please I need help to resolve this question

    Thanks alot to everyone helped me

  9. #18
    cdg10620's Avatar
    cdg10620 is offline Programming Expert
    Join Date
    Jun 2009
    Location
    Texas
    Posts
    387
    Blog Entries
    3
    Rep Power
    12

    Re: Please I need help to resolve this question

    nvm
    Last edited by cdg10620; 03-23-2010 at 06:55 AM. Reason: Answer already posted
    -CDG10620
    Software Developer

Closed Thread
Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Question:technical question answering system algorithm?
    By vbehzadan in forum General Programming
    Replies: 1
    Last Post: 04-28-2010, 12:41 PM
  2. Please Help Me Resolve Subdomain in htaccess
    By tradingjamie in forum PHP Development
    Replies: 0
    Last Post: 09-20-2009, 10:47 AM
  3. Intel gdb does not resolve bp. at strcpy()
    By azm in forum Assembly
    Replies: 2
    Last Post: 08-24-2009, 09:03 AM
  4. cannot resolve symbol
    By dvdtomkins in forum Java Help
    Replies: 12
    Last Post: 08-06-2008, 02:28 AM
  5. help us resolve the perl program problem
    By gopalsd in forum Perl
    Replies: 8
    Last Post: 02-25-2008, 03:02 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts