I understand but I don't understand this class. When I think I know how I lose it. Help me understand in dummy terms.. Thanks
I need to write a pseudocode for going out to a party for programming logic class. HELP!!!?
Psuedocode is just a guideline to help you write the actual code. It's not real code, it just looks like it and helps you figure out how you need to code it.
For example, psuedocode for acing a test.
if studytime %26gt; 2 then
grade = A
if studytime %26lt; 2 then
grade = F
It's psuedocode because the code because it looks kind of like code, but it's not really. In JavaScript, the actual code would look like this.
if (studytime %26gt; 2) {
grade = "A";
}
if (studytime %26lt; 2) {
grade = "F";
}
Psuedocode can also be really vague if you want it to.
if num is even then
The number is even.
else if num is odd then
The number is odd.
else the number is zero.
When you actually code it, it would look like this (in JavaScript):
if (num % 2 == 0) {
alert("The number is even.");
}
else if (num % 2 != 0) {
alert("The number is odd.");
}
else {
alert("The number is zero.");
}
Reply:Contact a C++ expert. Check http://expert.myitcareer.org/
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment