I just started taking Logic and design and Im not understanding the whole concept. I try writing it but know that its wrong and im leaving to many things out and dont know what to write or how to write it. My book tells me "this is how its done" but i dont understand why or how to write a code that asks for multiple decisions and processes. if someone could explain how and why these things work i would be in debt to you.


Someone please help!!

The question im working on is:

The summerville phone company chrges 10 centa per minute for all calls out side of the costumers area code that last over 20 minutes. All other calls are 13 cents per minute. Design a pseudocode for the following:

a. A program that accepts the following about one phone call: cosumer area code (3 digit), the costumers phone number (7 digits) called area code (3 digits), called phone number (7 digits), and called time in minutes (4 digit). Display the calling number, called number, and price for te call.

b. A program that continuously accepts data about phone calls until sentinel value is entered, and displays only about calls the cost over $10.

c. A program that continuously accepts data about phone calls until sentinel value is entered, and displays deails only about calls placed from the 212 area code to the 757 area code that last over 20 minutes.

d. A program that promts the user for a three-digit area code from which to select phone calls. Then the program coninuously accepts data about phone calls until sentinel value is entered, and displays only for phone calls placed to or from specified area code.

We can't tell you what's wrong with your logic if you don't post the pseudocode you have. Don't expect us to give you the solution.

Pseudo code is just a step by step description of how to perform a computation, along with appropriate explanations of what each step does to fulfill the requirements. There is no magic here, just work so get started!

If you need an example of pseudo-code lets take the example of how to find the largest element in an array

pick the first element as the current largest

for each element in the array
    if this element is bigger than the current largest
        save this element as the current largest
    end if
next

And to be picky, I probably should not have included the "end if" and "next" statements because those are actual keywords and not pseudo-code. But you get the drift.

How do write the pseudo code for the following:
The monthly payment on a mortgage is calculated by M =(Pxix(1+i)n/((1+i)n-1)
where: p =pricipal, i monthly interest (=yearly rate/12), n= number of payments (=NoOfYears x 12)> Note that 'N'is a power.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.