Pseudocode Task

Hint: This pseudocode calculates the sum of even numbers up to a given even number N.

// The pseudocode calculates the sum of even numbers up to N.
total_sum = 0
counter_variable = 2
INPUT N  // A positive even integer from the user, assume numeric
 
WHILE counter_variable <= N:
    total_sum = total_sum + counter_variable
    counter_variable = counter_variable + 2
END WHILE
 
PRINT total_sum