 C++ Programming Code Examples

C++ > Computer Graphics Code Examples

Program to Find Maximum Number of Edge Disjoint Paths

Find Sum of Natural numbers from 1 to N - Program find the sum of all natural numbers between 1 to n. Input upper limit to find sum of natural numbers. Store it in some variable say N. Initialize another variable to store sum

Program to Generate All Pairs of Subsets - The "time complexity" of this algorithm is O (n*2^n). This algorithm takes the input of 'n' data element and prints unique subset pairs whose union gives the set. It generates 0 to

Pass Structure as an argument to Function - We have a function 'printStudentInfo()' which takes structure Student as an 'argument' and 'prints the details' of student using structure varaible. The important point to note here is

C Diameter Circumference & Area of circle - C Functions to find Diameter, Circumference and Area of circle. First assign a meaningful name to all the three functions. Say function to calculate diameter, circumference & area

Convert Decimal to Binary number system - C program to input any decimal number from user and convert it to binary number system using bitwise operator. How to convert from decimal number system to binary number...

Find Reverse of a Number using Recursion - Declare recursive function to find reverse of a number. Lets give a meaningful name to our function, say reverse(). C function computes reverse of number, hence it must accept an...

Get Total Number of Notes in an Amount - C program to input amount from user & print minimum number of notes (Rs. 500, 100, 50, 20, 10, 5, 2, 1) required for the amount. Input amount from user. Store it in a variable 'amt'.

Determine if a given Matrix is a Sparse or - C Program determines the given matrix is a sparse matrix. Sparse matrix is a matrix with the majority of its elements equal to zero. Accept matrix and checks whether the given