1) Write a function named func() which has a double parameter named x. It calculates k = sin(x) + cos(1-x) and returns k
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
1) Write a function named func() which has a double parameter named x. It calculates k = sin(x) + cos(1-x) and returns k
1) Write a function named func() which has a double parameter named x. It calculates k = sin(x) + cos(1-x) and returns k which is a double value. Then, write a main program main() which reads 2 angles in radians) from the keyboard into double variables named alpha and beta; and calls func() to calculate n = [sin(a) + cos(1-a)] / [sin(B) + cos(1-B) as a double value. At the end of the program, n must be printed. • You can use sin and cos function in math library: #include <math.h> double sin(double x)) double cos(double x);
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!