Php Programming Code Examples
Php > Date Time Code Examples
Past Present Future
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
C Code Check Palindrome Using Recursion -
In this article we have shared two C programs to check if the input number is palindrome or not. 1) using while loop 2) using recursion. If a number 'remains same', even if we reverse its
Generate Random Subset by Coin Flipping -
Prints a 'subset' of the given array using coin flipping method. The time complexity of this algorithm is O(n). Takes the input of 'n' data element and prints a possible subset. that, it
C++ Program to Implement Insertion Sort -
Insertion sort algorithm sort data by inserting them one by one into the List. This algorithm is based on sorting playing cards by picking & inserting them one by one. Here we take data
String Search Algorithm & Short text sizes -
C++ program performs Naive string matching without using any specific library functions. A text and a Pattern is given as input. Pattern is searched for in a text and all 'instances' of the
Program Copy String with strcpy Function -
Input a "string from user" and store it to some variable say text1, declare another variable to store "copy of first string" in text2. Run a loop from 0 to end of string. Loop structure should
Convert Octal to Decimal Number System -
Program to input Octal number and convert to Decimal number. Octal number system is a base 8 number system. Octal number system uses 8 symbols to represent all its numbers...
Converts Octal Number to Binary Number -
To convert octal number to binary number in C++, you have to ask to the user to enter the octal number to convert it to binary number to display the "equivalent value" in binary as