Skip to content

PHP: Sub deve retornar valor absoluto #8

@levysantiago

Description

@levysantiago

Arquivo: Calculator.php

Função sub() deve retornar o valor absoluto do resultado de a - b. Ou seja:

10 - 2 = 8
2 - 10 = 8

Sugestão: se b > a fazemos b - a, senão faz o contrário.
Ou se o resultado for negativo, multiplica por -1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions