Ayush Gupta has Published 530 Articles

Program to find greater value between a^n and b^n in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 11:46:12

150 Views

In this tutorial, we will be discussing a program to find greater value between a^n and b^n.For this we will be provided with three numbers. Our task is to calculate a^n and b^n and return back the greater of those values.Example Live Demo#include using namespace std; //finding the greater value ... Read More

Program to find GCD or HCF of two numbers in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 11:43:56

614 Views

In this tutorial, we will be discussing a program to find GCD and HCF of two numbers.For this we will be provided with two numbers. Our task is to find the GCD or HCF (highest common factor) for those given two numbers.Example Live Demo#include using namespace std; int gcd(int a, ... Read More

Program to find GCD or HCF of two numbers using Middle School Procedure in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 11:40:38

1K+ Views

In this tutorial, we will be discussing a program to find GCD or HCF of two numbers using Middle School Procedure.For this we will be provided with two numbers. Our task is to find the GCD (greatest common divisor) or HCF (highest common factor) for the given values.Example Live Demo#include ... Read More

Program to find GCD of floating point numbers in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 11:35:58

488 Views

In this tutorial, we will be discussing a program to find GCD of floating point numbers.For this we will be provided with two integers. Our task is to find the GCD (Greatest common divisor) of those two provided integers.Example Live Demo#include using namespace std; //returning GCD of given numbers double ... Read More

Program to find first N Iccanobif Numbers in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 11:33:15

123 Views

In this tutorial, we will be discussing a program to find N lccanobif numbers.For this we will be provided with an integer. Our task is to find the lccanobif number at that position. They are similar to the fibonacci number except the fact that we add the previous two numbers ... Read More

Program to find equation of a plane passing through 3 points in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 11:29:23

401 Views

In this tutorial, we will be discussing a program to find equation of a plane passing through 3 points.For this we will be provided with 3 points. Our task is to find the equation of the plane consisting of or passing through those three given points.Example Live Demo#include #include #include ... Read More

Program to find Cullen Number in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 11:27:30

148 Views

In this tutorial, we will be discussing a program to find Cullen Number.For this we will be provided with an integer. Our task is to find the cullen number at that position using the formula −2n* n + 1Example Live Demo#include using namespace std; //finding the nth cullen number unsigned ... Read More

Program to find covariance in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 11:25:14

712 Views

In this tutorial, we will be discussing a program to find covariance.For this we will be provided with two sets of random variables. Our task is to calculate their covariance i.e, the measure of how much those two values differ together.Example Live Demo#include using namespace std; //function to find mean float ... Read More

Program to find count of numbers having odd number of divisors in given range in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 11:22:36

394 Views

In this tutorial, we will be discussing a program to find the count of numbers having odd number of divisors in a given range.For this we will be provided with the upper and lower limits of the range. Our task is to calculate and count the number of values having ... Read More

Program to find correlation coefficient in C++

Ayush Gupta

Ayush Gupta

Updated on 09-Sep-2020 11:20:26

2K+ Views

In this tutorial, we will be discussing a program to find correlation coefficient.For this we will be provided with two arrays. Our task is to find the correlation coefficient denoting the strength of the relation between the given values.Example Live Demo#include using namespace std; //function returning correlation coefficient float find_coefficient(int X[], ... Read More

Advertisements