 # C++ Programming Code Examples

## C++ > Mathematics Code Examples

### Program to Find Closest Pair of Points in an Array

Perform Input Output all Basic Data Types - C language program demonstrate input and output of all basic and derived types. How to use scanf() & printf() function perform input and output on primitive types in C language.

C++ Program Find Quotient & Remainder - In program, user enter 2 integers (divisor and dividend), computes quotient and remainder. To compute 'quotient and remainder', divisor and dividend should be integers. The division

Program Construct a Balanced Binary Tree - Construct a balanced binary tree using sorted array. Given binary search tree example. The preorder traversal of binary search tree is as follows. Create a new node and a balanced...

Converts Hexadecimal to Decimal Number - C program to input hexadecimal number and convert it to Decimal number. Hexadecimal number system is a base 16 number system. It uses 16 symbols to represent all number i.e.

The C++ Language Multilevel inheritance - "Multilevel inheritance" represents a type of inheritance when a "Derived" class is a base class for another class. In c++ deriving a class from a derived class is known as 'multi-level'

Most Significant Bit (MSB) of a number is - In C programming language we use bitwise AND & operator to check status of any bit. Bitwise AND operation evaluate each bit of resultant value as 1, if corresponding bit of...

C Language Check Triangle is Valid or Not - C Program code to input side of a Triangle & check whether triangle is valid or not using if else. A triangle is valid if sum of its two sides is greater than the third side. Means if a, b, c

Printing 100 Ramanujan Numbers 2 Ways - C++ Sample code Print first 100 "Ramanujan Numbers" by TWO WAYS 1st way is printing ramunajan numbers from RN taking RN from 0 to INFINITY & print first 100 numbers. 2nd