Skip to content

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

Notifications You must be signed in to change notification settings

pirex360/prime-numbers

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Languages