vurslick.blogg.se

Write a pseudocode
Write a pseudocode








The value of the expression a^2 +b^2 is calculated, Set area = pow (4,2) The statement works like this:

write a pseudocode write a pseudocode

The function returns the value of 4 raised to the power of 2, which is assigned to the area variable. Set result = sqrt (16) Square Root library Function Declare Integer numberĭisplay "The square root of that number is ", squareRoot This statement calls the pow function, passes 4 and 2 as arguments. The function returns the square root of 16, which is then assigned to the result variable. Function Boolean isEven (Integer number)Įnd If This statement calls the sqrt function, passes 16 as an argument. Design Boolean function named isEven that accepts a number as an argument and returns True if the number is even, or False otherwise.










Write a pseudocode