Is Relational Operator Usage in Pseudo-Code Valid?

  • Thread starter Thread starter mdnazmulh
  • Start date Start date
  • Tags Tags
    Writing
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 14K views
mdnazmulh
Messages
51
Reaction score
0
I have just started computer programming in this running semester. So, I'm not experienced in writing pseudo-code. I have one thing to ask. Look at the following c++ statements:

if (x>10)
count<<"x is greater than 10"<<endl;

Can I replace these c++ statements by the following pseudo-code?

If x>10 (Look, i used relational operator in pseudo-code. Is it valid?)
print "x is greater than 10"
 
Physics news on Phys.org
I imagine your example is very theoretical is is just used to illustrate the idea of pseudo code for a class or something?

Because nobody in their right mind would write pseudo code that detailed, it is 6 chars short of the real code! Imagine writing a code outline for a chess game with that much detail. You might as well just write the game itself.

k