sivek/energyglobalapp

this is a energy global test case library

1.0 2022-08-18 20:36 UTC

This package is auto-updated.

Last update: 2025-06-19 02:32:37 UTC


README

PHP developer test case.

A Simple form with three input boxes that asks user for input if the want to calculate divisors, factorial and primenumbers

Solution contains following public functions:

calcDivisors calcDivisors takes an integer and returns an array with all of the integer's divisors (except for 1 and the number itself). Prime numbers are not allowed. calcFactorial calcFactorial calculates and returns the factorial for a given input. Input below 0 and above 12 is not allowed. calcPrimeNumbers calcPrimeNumbers takes an array with integers finds the prime numbers and returns the result as a XML document which each found prime number in a ‘number’ node.