Pseudo code question

What does <> mean in pseudocode?
Thanks.

For example while(something <> 0)
Last edited on
It could be
while(something < 0 || something > 0)
.
It's super vague in the pseudocode I was provided, it doesn't really make any sense to me.

it actually says while ( dollars <> 0) displayBills(dollars)
What are the details of your assignment?
Have you started the assignment yet?
Yeah, I started it. This is one of the first lines of code so that's why I don't really understand the <> sign. It's a simple assignment, but sometimes the professor writes the pseudocode like shit.
I think that it is a non-standard symbol for is not equal to here; while( dollars is not equal to zero )

The standard mathematical symbol is , the equivalent C++ operator is !=
1
2
3
4
5
6
7
8
9
10
11
// Start 
//     Declarations 
//       num dollars 
//     output "Please enter the a whole dollar amount (no cents!).  Input 0 to terminate: " 
//     input dollars 
//     while ( dollars <> 0) 
//       displayBills(dollars) 
//       output "Please enter the a whole dollar amount (no cents!).  Input 0 to terminate: " 
//       input dollars
//     endwhile 
// Stop 


Also, there's more code after the "Stop" pseudo, what would "stop" translate into c++ code?

Also, I want to add I don't want you to do the assignment, I just want to know what
<> and "stop" translates into.

Thanks.
Last edited on
Also, there's more code after the "Stop" pseudo, what would "stop" translate into c++ code?
"Stop" literally means the end of the function main().
Yeah, that's what I thought. What is this dude doing, there can't be code added after main()..

example.
1
2
3
4
5
6
7
// Stop 
//
 //
 //
 // displayBills(num dollars) 
//     Declarations 
//       num ones 
1
2
3
 // displayBills(num dollars) 
//     Declarations 
//       num ones  

It means you have to implement a new function, displayBills().
Oh I see. Thanks, Tencacle. You've been a big help. Cheers.
If you're still there I have one last question.
Would this pseudo mean to multiply by 20%?

temp = dollars % 20
If you're still there I have one last question.
Would this pseudo mean to multiply by 20%?

No.
Can you please explain what it would mean then?
temp = dollars * 0.20;
That's what I meant, multiplying by 20% is written at * .20.
Thanks.
> Would this pseudo mean to multiply by 20%? temp = dollars % 20

It means: set temp to the remainder after division of dollars by 20.
https://en.wikipedia.org/wiki/Modulo_operation
Topic archived. No new replies allowed.