Ask Experts Questions for FREE Help !
Ask
    nova2177's Avatar
    nova2177 Posts: 1, Reputation: 1
    New Member
     
    #1

    Jul 12, 2008, 03:48 PM
    modular progams (pseudo-code algorithm)
    how do you extract a module from a pseudo-code algorithm.
    I'm not sure if I can post the question here but here goes.

    a) write an algorithm that will display the sum for a given numbers of squares, e.g. if the user enter the value 3, then the output should be 1² + 2² + 3² = 14
    b) from (a) use a module called sumsquare that will accept an integer value and return the sum of the squares of the value entered
    c) use the sumsquare module to write an algorithm that will perform the same function as (a)

    I think I figured out (a) but I have never done modules, I only know what it is. If some one can help me out, please help, show me an example of some sort, doesn't have to be the question that I post.
    thanks.
    KISS's Avatar
    KISS Posts: 12,510, Reputation: 839
    Uber Member
     
    #2

    Jul 12, 2008, 04:48 PM
    This is how I interpret the question.

    a) Is just plain pseudocode

    b) Basically means something that will use "include sumsquare.c"
    In sumsquare.c is a function sumsquare[x].

    c) in pseudocode
    main.c
    input x
    print sumsquare (x)
    end main

    sumsquare.c
    function sumsquare(x)
    return sum of squares (x)
    end sumsquare.c

    My c is very rusty.

    Basically your creating two programs of source code.

    Does this make sense?

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Small business start up progams for convicted felons [ 9 Answers ]

Are there any known government programs to assist convicted felons in starting a small business or buying into a franchise ?

Modular home [ 1 Answers ]

I'm trying to find a bathroom ceiling light to work with my existing fan, the opening in the ceilling is 7.5" x 7.5" and will the existing wiring to the fan be OK to power up the light

Modular house in PDX, OR [ 1 Answers ]

I want to move to PDX. OR in about 8 years. What are your opinions on a modular home? We want to kind of design it ourselves. My sister and I will want 2 master suites, 1 guest room, a great room with an open kitchen and if possible an apartment over a 3 car garage. Is this kind of owner designing...

Pseudo Codes. [ 2 Answers ]

Hello. A friend of mine drew me into visual basic classes for my school, and I am currently stuck on doing pseudo codes. Does anyone have good insights and tips on how to make one? And does anyone have examples? Thank you.

Best Email Progams [ 34 Answers ]

What is everyone's opinion on a good solid email program, I'm talking a power user, or big business, just a normal home PC user. I prefer Pocomail 4 as it has what I consider the best Spam filter and customizable interface and speed. If you want a lot of smileys, backgrounds to use and well...


View more questions Search