Swapping two numbers
Swapping two numbers Two numbers can be swapped or interchanged. It means first number will become second and second number will become first. For example There are two methods for … Read More
Swapping two numbers Two numbers can be swapped or interchanged. It means first number will become second and second number will become first. For example There are two methods for … Read More
Reverse String A string can be reversed either using strrev() function or simple PHP code. For example, on reversing JAVATPOINT it will become TNIOPTAVAJ. Logic: Reverse String using strrev() function … Read More
Reverse number A number can be written in reverse order. For example 12345 = 54321 Logic: Reversing Number in PHP Example: Below progrem shows digits reversal of 23456.
Fibonacci Series Fibonacci series is the one in which you will get your next term by adding previous two numbers. For example,
Palindrome Number
Armstrong Number An Armstrong number is the one whose value is equal to the sum of the cubes of its digits. 0, 1, 153, 371, 407, 471, etc are Armstrong … Read More
Factorial Program The factorial of a number n is defined by the product of all the digits from 1 to n (including 1 and n). For example,
Table of Number
Output: Prime Number using Form in PHP Example: We’ll show a form, which will check whether a number is prime or not.
Even Odd Program Even numbers are those which are divisible by 2. Numbers like 2,4,6,8,10, etc are even. Odd numbers are those which are not divisible by 2. Numbers Like … Read More