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

    Nov 7, 2009, 07:23 AM
    Write basic Pseudo code If-t
    WRITE the basic pseudo code IF-THEN-ELSE statement for each of the following:

     

    1. If sum is greater than 100, print sum.
    2. If sum is greater than 5, print sum else add 10 to sum.
    3. If grade is greater than or equal to 90, print “A” else if grade is greater than or equal 80, print “B”, else print “F”.
    KISS's Avatar
    KISS Posts: 12,510, Reputation: 839
    Uber Member
     
    #2

    Nov 7, 2009, 08:11 AM

    This problem is really odd, because I consider those statements pseudocode. The only thing I can think of is that someone wants s you to substitute logical expressions for the conditionals:

    e.g.


    2. If sum is greater than 5, print sum else add 10 to sum.

    If sum > 5 then print sum else sum = sum +10
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #3

    Nov 7, 2009, 11:00 AM

    KISS is quite correct. The pseudo-code is already there. You might format it into something like this:

    1. If sum > 100 then
    ... Print sum
    2. If sum > 5 then
    ... Print sum
    ... Else
    ... Add 10 to Sum
    3. If Grade > 90 then
    ... Print "A"
    ... Else if Grade > 80 then
    ... etc.
    colette35's Avatar
    colette35 Posts: 1, Reputation: 1
    New Member
     
    #4

    Oct 30, 2011, 08:29 AM
    1. If sum is greater than 100, print sum

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!

Visual basic code for calculator [ 8 Answers ]

I am a student at college in somaliland. One of my instructors told me to write a small programme for a calculator in visual basic 6.0. so, I'm stuck with this. Help me with the codes.

Visual Basic Code [ 3 Answers ]

Hi There, I have a VBA macro from work which transfers our reports from one excel sheet to another and then updates itself to particular dates under each user name. I am totally confused how it works... because it doesn't use any kind of link with the file. I have done VB 6.0 and am out of...

Modular progams (pseudo-code algorithm) [ 1 Answers ]

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...

Code 19 - Vista Home Basic [ 16 Answers ]

Can anybody help me with this problem? My CD/DVD Drive does not work; in the Device Manager there is a message which says: "windows cannot start this hardware device because its configuration information (in the registry) is incomplete or damaged (code 19). Please note that my PC runs with Vista...


View more questions Search