Casio 35+ Rounding Algorithm

Solved
-shun -  
 Thor -
Hello,

I am currently working on the algorithms and I have a small problem; I don't know where to find the key to round a value. Could someone please help me? Thanks in advance!

Here is my algorithm in natural language:

Input A
Assign to B the value of the square root of A
Assign to C the rounded value of B <- This is the part that I can't program!
If B=C
Then display "A is not a perfect square"
Else
Display "A is not a perfect square"

1 answer

  1. KX Posted messages 19031 Status Moderator 3 020
     
    I don't have a 35+ on hand to test, but on the 100+ I do OPTN > NUM and the Int function rounds down to the nearest whole number.
    --
    Confidence does not exclude control.
    4
    1. -Shu
       
      Thank you very much! It works on the 35+! :)
      0
    2. Vesper73 Posted messages 1 Status Member
       
      Hello,
      I am using a Casio 35+ program to calculate a percentage and the calculator gives me a result in the form of a fraction and I am trying to find out how to get a result directly in decimal form
      (for example, when I calculate the percentage of 26 out of 80, the calculator displays 62/5 instead of 32.5)
      please thank you in advance.
      0
    3. quent217 Posted messages 424 Status Member 348
       
      Hello,
      normally to convert from a fraction to decimal form you need to press the F<->D key, but I don't quite understand because in a program the numbers displayed are never in fraction form

      --
      -1
    4. Thor
       
      You need to change the button that performs the calculation; either you did A:B, or you did A/B, the result is not in the same format depending on what you take.
      0