Hi there, i need a help to solve a c++ program:

write a program that :
Read from the keyboard 3 numbers (use double type) a,b,c.
A is just an array.
Ensure that A: c includes (-1,1)
Create an array A :40
A: e= a*sin(a) + b cos(α)
Where α = π ((1/40) +c) and i= 1,2,3……40
Calculate A: d= 0.5(a + b)
Find the element of the array ek and its index K such that
A: |ek-d|