Create the pseudocode for a switch statement that checks the value of a variable named Color.
The possible values include Pink, Green, Purple, Orange, Black.
The switch statement should display the color. Include an Else Case.
Original Post Feb 27th 2012
1. Read the following pseudocode:
If Number > 8 And Number < 10
Display “This number meets the condition.”
Else
Display “This number does not meet the condition.”
End If
2. Answer the following question:
What number would need to be stored in Number to make this program display the message “This number does not meet the condition”? Why?
Answer
To get the message “This number does not meet the condition” the user would have to select any number that <=8 and >=10
The pseudocode requires the number 9 to meet the condition
Original Post Feb 27th 2012
1. Read the following pseudocode:
If Number > 8 Or Number = 10
Display “This number meets the condition.”
Else
Display “This number does not meet the condition.”
End If
2. Answer the following question:
What number would need to be stored in Number to make this program display the message “This number does not meet the condition”? Why?
Answer
To get the message “This number does not meet the condition” the user would have to select any number that <=8
The pseudocode requires any number greater than 8 to meet the condition
Original Post Feb 27th 2012
Original Post Feb 27th 2012
The 5 steps used to develop an algorithm
1. Define the problem
2. Define the inputs
3. Define the outputs
4. Define processing
5. Develop the algorithm (pseudocode & flow chart)
Original Post Feb 27th 2012
Original Post Feb 26th 2012
Step 1 : Define Problem
Each frame, X is incremented by R and Y is incremented by T. If X becomes greater than 5000 then Y is decremented by 1000. If Y becomes less than 0, Y and X are set to 0.
Original Post Feb 26th 2012