Skip to content

Latest commit

 

History

History
28 lines (15 loc) · 708 Bytes

README.md

File metadata and controls

28 lines (15 loc) · 708 Bytes

Prime Numbers

Description / Problem

Write a PHP script that prints all integer values from 1 to 100.

Beside each number, print the numbers it is a multiple of (inside brackets and comma-separated). If only multiple of itself then print “[PRIME]”.

Installation

Clone this repository: https://github.com/pirex360/prime-numbers.git

Usage

PHP Version 8.1.x Run the PHP script using the command line: php index.php

Tests

To run the unit tests for the Number class and the PrimeTrait trait, use PHPUnit: ./vendor/bin/phpunit

This will runs 5 tests with 18 assertions.

Prime Demonstration

Demonstration

Prime Demonstration