Given N-sided polygon we need to find the number of triangles formed by joining the vertices of the given polygon with exactly one side being… Read More
Category Archives: C++ Programs
ADALINE (Adaptive Linear Neuron or later Adaptive Linear Element) is an early single-layer artificial neural network and the name of the physical device that implemented… Read More
Given a Pentagram and its inner side length(d). The task is to find out the area of Pentagram. The Pentagram is a five-pointed star that… Read More
In Probability, Discrete Uniform Distribution Function refers to the distribution with constant probability for discrete values over a range and zero probability outside the range.… Read More
The Boost String Algorithms Library provides a generic implementation of string-related algorithms which are missing in STL. It is an extension to the algorithms library… Read More
Given an unsorted array, the task is to remove the duplicate elements from the array using STL in C++ Examples: Input: arr[] = {1, 2,… Read More
The is_sorted() function in C++ boost library is found under the header ‘boost/algorithm/cxx11/is_sorted.hpp’ which tests if the given sequence is sorted or not according to… Read More
Given a sorted array, the task is to remove the duplicate elements from the array using STL in C++ Examples: Input: arr[] = {2, 2,… Read More
The is_partitioned() function in C++ boost library is found under the header ‘boost/algorithm/cxx11/is_partitioned.hpp’ which tests if the given sequence is partitioned according to the given… Read More
The one_of_equal() function in C++ boost library is found under the header ‘boost/algorithm/cxx11/one_of.hpp’ which tests if exactly one of the elements of a sequence against… Read More
The none_of() function in C++ boost library is found under the header ‘boost/algorithm/cxx11/none_of.hpp’ which tests all the elements of a sequence and returns true if… Read More
The one_of() function in C++ boost library is found under the header ‘boost/algorithm/cxx11/one_of.hpp’ which tests the elements of a sequence and returns true if exactly… Read More
The all_of() function in C++ boost library is found under the header ‘boost/algorithm/cxx11/all_of.hpp’ which tests all the elements of a sequence and returns true if… Read More
We can use Exception handling with class too. Even we can throw an exception of user defined class types. For throwing an exception of say… Read More
Given that person A takes a days to do a certain piece of work while person B takes b days to do the same work.… Read More