# Php Programming Code Examples

## Php > Code Snippets Code Examples

### Calculate VAT on a price and round to two decimal places

Convert Binary Number Octal Vice-Versa -
You will learn to convert "binary number" to octal, and octal number to binary manually by creating a "user-defined" function. In this, first convert the binary number to "decimal".

C Code Print ASCII values of all Characters -
Program print ASCII values of all characters. ASCII stands for American Standard Code for Information Interchange. It is a set of integer values that represents different printable and

How to Use Constructors in C++ language -
Read the comments in the following program to understand each part of the program. This is a "default constructor" of the class, you do note that it's name is same as class name and

C Convert Binary to Octal Number System -
In C program user is asked to enter the binary number and the program then converts that binary number to the octal number by calling a user defined function. To understand this...

Checking the Number is a Perfect Number -
Program input a number and check whether the number is Perfect number or not. Perfect number is a positive integer which is equal to the sum of its proper positive divisors. So 6 is

C Display Nodes of a Linked list in Reverse -
C Program uses recursive function & reverses the nodes in a Linked list and displays the list. Linked list is an ordered set of data elements, each 'containing a link' to its successor. This C

Efficient Implementations of Disjoint Sets -
numElements is the initial number of disjoint sets. Union "Two Disjoint" sets. For simplicity, we assume "root1 and root2" are distinct and represent set names. "root1" is the root of set

Conditional Operator Check Even or Odd -
C programming code to input a number and check whether number is even or odd using Conditional/Ternary operator ?:. Check even or odd numbers using conditional operator...