Ayush Gupta has Published 530 Articles

Program to find N-th term of series 3, 5, 33, 35, 53… in C++

Ayush Gupta

Ayush Gupta

Updated on 04-May-2020 07:19:07

143 Views

In this tutorial, we will be discussing a program to find N-th term of series 3, 5, 33, 35, 53…For this, we will be provided with a number. Our task is to find the term for the given series at that particular position.Example Live Demo#include using namespace std; //finding the ... Read More

Program to find Circumference of a Circle in C++

Ayush Gupta

Ayush Gupta

Updated on 14-Apr-2020 12:23:00

413 Views

In this tutorial, we will be discussing a program to find circumference of a circle.For this we will be provided with the radius of the circle. Our task is to calculate and print the circumference of that circle.Example Live Demo#include using namespace std; #define PI 3.1415 double circumference(double r){    double ... Read More

Program to find Circumcenter of a Triangle in C++

Ayush Gupta

Ayush Gupta

Updated on 14-Apr-2020 12:22:06

562 Views

In this tutorial, we will be discussing a program to find the circumcenter of a triangle.For this we will be provided with three noncollinear points. Our task is to find the circumcenter of the triangle formed by those points.Example Live Demo#include #include using namespace std; //storing X and Y ... Read More

Program to find century for a year in C++

Ayush Gupta

Ayush Gupta

Updated on 14-Apr-2020 12:17:53

669 Views

In this tutorial, we will be discussing a program to find the century for a year.For this we will be provided with a year. Our task is to find the century in which the given year falls.Example Live Demo#include using namespace std; void find_century(int year){    //year values can only ... Read More

Program to find area of a Circular Segment in C++

Ayush Gupta

Ayush Gupta

Updated on 14-Apr-2020 12:15:53

239 Views

In this tutorial, we will be discussing a program to find area of a circular segment.Making a chord in a given sphere divides it into two segments - major and minor. Given the radius of the circle and angle making the minor segment, we are required to find the areas ... Read More

partition_point in C++

Ayush Gupta

Ayush Gupta

Updated on 14-Apr-2020 12:13:33

122 Views

In this tutorial, we will be discussing a program to understand partition_point in C++.Partition point is a method which returns an iterator pointing to the first value in a given range. The range is a partitioned one in which the predicate is not true.Example Live Demo#include #include #include ... Read More

Pair in C++ Standard Template Library (STL)

Ayush Gupta

Ayush Gupta

Updated on 14-Apr-2020 12:11:55

492 Views

In this tutorial, we will be discussing a program to understand pair in C++ Standard Template Library.Pair is a container defined in the utility header that contains two values. It is used to combine two values and associate them even if they are of different types.Example Live Demo#include #include ... Read More

Override Keyword in C++ programming

Ayush Gupta

Ayush Gupta

Updated on 14-Apr-2020 12:10:44

228 Views

In this tutorial, we will be discussing a program to understand override keyword in C++.Override keyword is used to override the function in a base class and define a separate function with the same signature in the child class.Example Live Demo#include using namespace std; class Base {    public:   ... Read More

Output Iterators in C++ programming

Ayush Gupta

Ayush Gupta

Updated on 14-Apr-2020 12:09:22

145 Views

In this tutorial, we will be discussing a program to understand output iterators in C++.Output iterators are a part of the major five iterators. They function opposite of the input iterators in a way that they can be assigned values but can’t be accessed to fetch values.Example Live Demo#include #include using ... Read More

Ordered Set and GNU C++ PBDS

Ayush Gupta

Ayush Gupta

Updated on 14-Apr-2020 12:07:48

2K+ Views

In this tutorial, we will be discussing a program to understand ordered set and GNU C++ PBDS.Ordered set is a policy based structure other than those in the STL library. The ordered set keeps all the elements in a sorted order and doesn’t allow duplicate values.Example Live Demo#include using namespace ... Read More

Advertisements