 C++ Programming Code Examples

C++ > Conversions Code Examples

C++ program to Convert Decimal to Octal

C Operate Appropriately On The Numbers - Program take two numbers and a operator as input and store it in the variables a, b and ch respectively. Using switch statement, test the operator stored in the variable ch. Print the

Finds HCF of given Number use Recursion - Program to find HCF of a given number using recursion. Programming code using recursion finds the HCF of 2 entered integers. The 'HCF' stands for Highest Common Factor. Enter the

Calculates Area & Circumference of Circle - To calculate "area and circumference" of any circle in "C++", you have to ask to the user to enter the radius of circle, place the radius in a variable say r and make two variable, one for

Program print equivalent series resistance - Program code to find equivalent resistance of parallel combination of resistive circuits. Enter the number of resistances. Enter value of each resistance. Printing equivalent series

C program to Getting the Time as a String - Returns the time as a string in 12 or 24 hour format. Stores the time as a string. Getting time value. Getting time and date structure. Save the hour value. Adjust if 12 hour format.

Find ith Largest Number from a Given List - It is an improvement in BST by adding 2 more key functions - 'rank()' and 'select()'. The time complexity of Order-Statistic tree generation is O(n+n*log(n)). Once the tree is constructed

Code Finding Minimum Number of Edges - Program to find minimum number of edges to cut to make the 'graph disconnected'. An edge in an undirected connected graph is a bridge if removing it disconnects the graph.

C Finds Sum of Even Numbers from 1 to N - C Program to input upper limit to find sum of even number. Store it in some variable say N. Initialize another variable to store sum with 0 say sum = 0. To find sum of even numbers we