Hi,

I'm new to c code and have got quite alot to learn.

im currently working on a uni assignment have got an issue with interpreting some pseudocode that i have been given that i have to put into c code.

<< Round up to n decimal points >>

FUNCTION roundUP(value, decimalPlaces)

BEGIN

SET magnitude = 1

FOR d = 0 TO decimalPlaces

magnitude = magnitude * 10

END FOR

value = value * magnitude

value = value + 0.5

value = value / magnitude

RETURN value

END

i have got some code that finds the median in an odd number of columns and i know i use the function above to round up to the middle column.

my problem is im having trouble understanding how this pseudocode works and also how i go about interpreting it into c code.

any help would be great.

thanks

anthony