Php Programming Code Examples
Php > Strings Code Examples
Easy Display of Dollars
C Compute the Sum of Digits in an Integer -
C Program take the integer as input. Divide the input integer by 10, obtain its remainder and quotient. Increment the new variable with the remainder got at step 2. Repeat the
C Programming Codings Checks Leap Year -
C Language program check leap year using if else. Wikipedia states Leap Year as a special year containing one extra day i.e. total 366 days in a year. A year is said to be leap year,...
Subtract Complex Number using Operator -
In this c++ program example, three objects of type "Complex" are created and user is asked to enter the real and imaginary parts for two complex numbers which are stored in objects
Counts Occurrences of Character in String -
Program count all occurrences of a character in string using Loop. Input a string, store it in some variable "str". Input character to search occurrences and store it in some variable say
C++ Codings Sample Heap Sort Algorithm -
The 'Heapsort' is a comparison-based sorting algorithm. 'Heapsort' can be thought of as an improved 'Selection Sort': like that algorithm, it divides its input into a sorted & an unsorted
Find the Volume and Surface Area of Cone -
This C Program to calculates the volume and surface area of cone. This program is used to find the the volume and surface area of cone. Surface_Area = Pi * r * (r + sqrt(r2 + h2)) and
Counts Numbers of Vowels & Consonants -
C program to Count total number of Vowel or Consonant in a string using switch case. Input String from user, store it in some variable say 'str'. Initialize 2 other variables to store vowel
C Program Flip all Bits of a Binary Number -
Flipping a bit means toggling or inverting the current bit status. If the current bit is set i.e. 1 than invert it to 0 and vice versa. Flip all bits of a binary number you can run loop from 0...