Section 01: Introduction PHP Examples

Beginner programs

  • Exercise 01: Arithmetic

    This program asks the user to enter two integers. The program then reads in both integers. Calculates the sum, the difference, the product and the quotient of the inputed integers and prints out the results.

    Date completed: 13/10/2017

  • Exercise 02: Which Is Larger?

    This program asks the user to enter two integers. The program reads in the two integers. It then evaluates both integers and decides which one is larger or if both integers are equal.

    Date completed: 13/10/2017

  • Exercise 03: More Arithmetic

    This program asks the user to enter three integers. The program reads in three integers. It then calculates the Sum, the Average, the Product of the three integers. It determines which integer is the largest and which is the smallest. The program then outputs the results.

    Date completed: 13/10/2017

  • Exercise 04: Area Of A Circle

    This program reads in the radius of a circle and then calculates and prints out the area of the circle.

    Date completed: 02/11/2017

  • Exercise 05: Odd Or Even

    The program reads in an integer from the user and determines if it is odd or even.

    Date completed: 04/11/2017

  • Exercise 06: Multiples

    This program asks the user to input two integers and determines if the first integer is a multiple of the second.

    Date completed: 04/11/2017

  • Exercise 07: Checkerboard

    This application displays a checkerboard pattern using Asterisks (*).

    Date completed: 04/11/2017

  • Exercise 08: Separate

    This application asks the user to inputs a five digit number consisting, it then separates the number into its individual digits and prints the digits separated from one another by three spaces each.

    Date completed: 04/11/2017