Is this the if function or the math function problem?

The math is (datared-datared2) / datared2 >= 7
Then "Tidak layak"

The value of datared is 301, datared2 is 300. there is no more than 7 but it print "Tidak Layak". What is my problem?

Maths blocks....

1 Like

Your current code calculates datared-(datared2/100datared2) = datared - 0.01.

Instead, you should be putting the minus block inside the first socket of the division block (as TIMAI2 has shown in the post above).

1 Like

This is easier to debug if you do two things:

  • right click on each block and switch it to external sockets, to expose the nesting more visibly
  • Apply Do It to each block to show its value, using the Companion.

Thank you for your advice man!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.