Php Programming Code Examples
Php > Algorithms Code Examples
New functions for PHP3. For those that know Perl, you will recognize
Switch Statement Calculates Grade Points -
A simple c++ program which shows using of switch statement in c++. C++ Program which takes input a grade and display Grade Points Average GPA. Program takes inputs A,a, B,b,
Sum of Natural numbers using While loop -
Find the sum of natural numbers using While Loop. When you use while loop, you have to initialize the loop counter variable before the Loop & Increment or Decrement it inside the
C++ Decrement -- Operator Overloadings -
Increment ++ and decrements -- operator are overloaded in best possible way, increase the value of a data member by 1 if "++" operator operates on an object and 'decrease' value of
Insertion Sort Algorithm in C++ Language -
Insertion sort is simple sorting algorithm that builds the final sorted array ('or list') one item at a time. It is much less efficient on large lists than more advanced algorithms such as quick
C++ Code Matrix Multiplication 2D Arrays -
Matrix addition is the "operation of adding" 2 matrices by adding the corresponding entries together. 2 dimensional array, represented in the form of "rows and columns", also suitable
Program to Find Largest Element of Array -
To find the "Largest Element", the first two elements of array are checked and largest of these two element is placed in arr[0]. Then, the first and third elements are checked and
C Converting Roman Numbers to Decimal -
Take a roman number as input and store it in the array roman_Number. In the C function digit(), define the value of each digit of the roman number inside the switch statement
Convert Decimal number to Octal Number -
Accept the given decimal number. If number is less than 8 the octal number is the same. If the number > 7 then Divide the number with 8. Write down the remainder. Do steps 3 and