Sudhir sharma has Published 1149 Articles

Find number of days between two given dates in C++

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:52:41

6K+ Views

In this problem, we are given two arrays date1[] and date2 consisting of 3 integers which denote the DD-MM-YYYY of daes. Our task is to find the number of days between two given dates.Let’s take an example to understand the problem, Inputdate1[] = {13, 3, 2021}, date2[] = {24, 5, ... Read More

Find number from its divisors in C++

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:46:52

241 Views

In this problem, we are given an array divisors[] consisting of N integers which are the divisors of a number Num. Our task is to find the number from its divisors.The divisor array does not include 1 and the number.Let’s take an example to understand the problem, Inputdivisors[] = {3, ... Read More

C++ program to find Nth term of the series 5, 13, 25, 41, 61…

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:45:14

215 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 5, 13, 25, 41, 61, …Let’s take an example to understand the problem, InputN = 5Output61ExplanationThe series is − 5, 13, 25, 41, 61…Solution ApproachA simple approach to ... Read More

C++ program to find nth term of the series 5, 2, 13 41,...

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:43:50

210 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 5, 2, 19, 13, 41, 31, 71, 57…Let’s take an example to understand the problem, InputN = 5Output41ExplanationThe series is − 5, 2, 19, 13, 41, …Solution ApproachA ... Read More

C++ program to find Nth term of the series 3, 14, 39, 84…

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:42:43

172 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 3, 14, 39, 84…Let’s take an example to understand the problem, InputN = 4Output84Explanation4th term − ( (4*4*4) + (4*4) + 4 ) = 64 + 16 + ... Read More

C++ program to find Nth term of the series 1, 8, 54, 384…

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:41:39

164 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 1, 8, 54, 384 ...Let’s take an example to understand the problem, InputN = 4Output384Explanation4th term − (4 * 4 * (4!) = 384Solution ApproachA simple approach to ... Read More

C++ program to find Nth term of the series 1, 6, 18, 40, 75, ….

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:40:07

259 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 1, 6, 18, 40, 75 ...Let’s take an example to understand the problem, InputN = 4Output40Explanation4th term − (4 * 4 * 5 ) / 2 = 40Solution ... Read More

C++ program to find Nth term of the series 1, 5, 32, 288 …

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:38:54

346 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 1, 5, 32, 288 ...Let’s take an example to understand the problem, InputN = 4Output288Explanation4th term − (4^4) + (3^3) + (2^2) + (1^1) = 256 + 27 ... Read More

C++ program to Find Nth term of the series 1, 1, 2, 6, 24…

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:37:36

531 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 1, 1, 2, 6, 24, ...Let’s take an example to understand the problem, InputN = 7Output720ExplanationThe series is − 1, 1, 2, 6, 24, 120, 720Solution ApproachA simple ... Read More

C++ program to find nth Term of the Series 1 2 2 4 4 4 4 8 8 8 8 8 8 8 8 …

sudhir sharma

sudhir sharma

Updated on 15-Mar-2021 10:36:19

178 Views

In this problem, we are given an integer N. Our task is to create a program to Find Nth term of series 1, 2, 2, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8…Let’s take an example to understand the problem, InputN = 7Output4Solution ApproachA simple approach ... Read More

Advertisements