At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
Pseudo code is just a tool to help you get the flow and thought of the program on paper. So if you know that you want something to happen so long as one condition is true you could write: /* pseudo code */ while this is true do something if this happens do this or else this /* end pseudo */ This way you can organize your thoughts before you actually sit down and start writing code.
I have to write a Pseudocode based on turning Fahrenheit into Celsius.. With a formula of C=C=(f-32)*5/9. and Fahrenheit= (C*5/9)+32. Then a table with Fahrenheit Celsisus 32 0 60 15.56 90 32.2 12 -11 How would I start writing this code.
Assuming there were no specifics given during the outline of this assignment, I would do something along the lines of: Create variables and assign value; An array for each, assign to F for i equals zero, while i less than number of values, increment i; C[i] = f[i] - 32 * 5/9 Generate table display output
As you examine your code and evaluate each step you have to do you will find more details to add. Think of it as explaining to the computer in "human words" what steps to take.
I am just trying to figure out how to start it.. Start Input tempToday If = F Then C=(f-32)*5/9?? Is that looking right?
That is a good start but you will probably want to add a little more detail the further you progress, like your input section could be: /* start */ Display prompt for user "Enter temp for today" Get input from user temp = input display prompt for conversion "Would you like to convert that to F or C?" get input from user, convert = input etc. etc.
Yes, that url has some good examples of pseudo code.
This question is a joke.
Then dont answer it..
OH SNAP! :D
If you look at the wiki url you can see how you will eventually get to the point of programming in "human words" rather than the programming language you are using.
Sadly I have to use the programming language..
Writing the problem in code is much easier than pseudo code, IMHO.
I agree but this teacher wants it in pseudocode.. And it is a complicated thing for me to understand..
Pseudocode is just syntax (e.g) program bizzbuzz do i = 1 to 100 set print_number to true if i is divisible by 3 print "Bizz" set print_number to false if i is divisible by 5 print "Buzz" set print_number to false if print_number, print i print a newline end do --------------------------------------------- you have to make a F` to C` for that.
Well you are on the right track, I can say that my professors did not require the closeness to programming that the example here is, and it is very likely that yours will not be that strict either. The main concept is most likely to get you to think about your code from another perspective and help you create a tangible link between "everyday" and programming. Keep going the direction you started I think it will become more clear as you progress. :)
@paul99santos Comments like "this question is a joke" aren't exactly in line with the spirit of OpenStudy. To quote the old adage, "If you have nothing good to say, say nothing at all."
I'm getting confused. You're saying "Sadly I have to use the programming language.." and at the same time "this teacher wants it in pseudocode." It can't be both. If it has to be pseudocode that looks vaguely like your programming language (which one?), the task is eaasier than actually writing it in the language, because you don't have to make sure it compiles and runs correctly, just that someone can grasp the method you're using to solve the program (and presumably check that you're on the right track, and _then_ you can convert that pseudocode into real code). Sorry about the run-on sentence. IMHO atually writing down the code is _not_ easier than writing pseudocode, or drawing diagrams, or any combination of the two, for most non-trivial problems (of which converting a unit is not an example; my pseudocode would just say "convert to celsius")
@nczempin It's possible her teacher has a specific pseudocode syntax she's supposed to use. I've dealt with a few of those before.