Computer scienceAlgorithms and Data StructuresIntro to algorithms and data structuresPseudocode and representation

Pseudocode basics

Find abs

Report a typo

Create pseudocode that finds the absolute value of a number and stores the result in the abs variable.

Reorder lines using drag or arrows. Adjust indentation with left buttons
                abs = -a
              
                if a >= 0 then:
              
                a = -5
              
                abs = a
              
                else:
              
___

Create a free account to access the full topic