Sunidhi Bansal has Published 1100 Articles

C++ Program to calculate the value of sin(x) and cos(x)

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 13:07:30

5K+ Views

Given with the input as angles and the task is to calculate the value of sin(x) and cos(x) corresponding to the given angle and display the resultFor Sin(x)Sin(x) is a trigonometric function which is used to calculate the value of x angle.Formula$$\sin (x) = \displaystyle\sum\limits_{k=0}^\infty \frac{(-1)^{k}}{(2k+1)!}x^{2k+1}$$For Cos(x)Cos(x) is a trigonometric ... Read More

C++ Program to compute division upto n decimal places

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 12:59:42

938 Views

Given with the value of x and y as a positive integer with the value of n for number of decimal places and the task is to generate the division up to n decimal places.ExampleInput-: x = 36, y = 7, n = 5 Output-: 5.14285 Input-: x = 22, ... Read More

C++ Program to check whether points in a 3-D plane are Coplanar

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 12:54:39

311 Views

Given with the points (x1, y1, z1), (x2, y2, z2), (x3, y3, z3) and (x4, y4, z4) and the program must check whether the given points are coplanar or not. Points are said to be coplanar is they lie under same plane and if they are under different-2 planes than ... Read More

C++ Program to check if a given number is Lucky (all digits are different)

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 12:48:18

739 Views

Given with a number and the task is to check whether the input number is a lucky number or not and display the result.What is a Lucky NumberLucky number is the number whose each and every digit is different and if at least one digit is repeating than the number ... Read More

C++ Program to calculate the profit sharing ratio

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 12:44:56

258 Views

Given with an array of amount invested by multiple person and another array containing the time period for which money is invested by corresponding person and the task is to generate the profit sharing ratio.What is Profit Sharing RatioIn a partnership firm, profits and losses are shared between the partners ... Read More

C++ Program to calculate the number of odd days in given number of years

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 12:34:50

160 Views

Given with the positive integer value n and the task is to generate the number of odd days till the given year n.ExampleInput-: days = 500 Output-: number of odd days are: 5 Input-: days = 400 Output-: number of odd days are: 0How to calculate the number of odd ... Read More

C++ Program to calculate Double Integration

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 12:32:21

2K+ Views

We are given with the lower limit of variable x, upper limit of variable x, lower limit of variable y, upper limit of variable y, steps taken for corresponding x and steps taken for corresponding y and the task is to generate the double integration and display the result.ExampleInput-: steps ... Read More

C++ Program Probability for three randomly chosen numbers to be in AP

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 12:24:58

96 Views

Given with an array of numbers ā€˜nā€™ and the task is to find the probability of three randomly chosen numbers to be in AP.ExampleInput-: arr[] = { 2, 3, 4, 7, 1, 2, 3 } Output-: Probability of three random numbers being in A.P is: 0.107692 Input-:arr[] = { 1, ... Read More

C Program for sum of cos(x) series

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 12:23:00

5K+ Views

We are given with the value of x and n where, x is the angle for cos and n is the number of terms in the cos(x) series.For Cos(x)Cos(x) is a trigonometric function which is used to calculate the value of x angle.Formula$$\cos (x) = \displaystyle\sum\limits_{k=0}^\infty \frac{(-1)^{k}}{(2k!)}x^{2k}$$For Cos(x) seriesCos(x) = ... Read More

C Program for nth Catalan Number

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Nov-2019 12:19:33

1K+ Views

Given an interger n; the task is to find the Catalan Number on that nth position. So, before doing the program we must know what is a Catalan Number?Catlan numbers are the sequence of natural numbers, which occurs in the form of various counting number problems.Catalan numbers C0, C1, C2, ... Read More

Advertisements