write a C program that calculates the function abs[ X cos( X ) Y sin( Y ) ] usin
ID: 3530452 • Letter: W
Question
write a C program that calculates the function abs[ X cos( X ) Y sin( Y ) ] using one function and several arrays. For this assignment you will need to write the following function: double abs_XcosX_YsinY( double x, double y ); which returns: |Xcos(x) Ysin(y) | as illustrated here for the range of X from 0 to 20 and Y from 0 to 10 ( in radians ): const int MAX_X and MAX_Y, given suitable values. These will limit the size of problems that your program can handle. ? double X[ MAX_X ] and Y[ MAX_Y ] will hold the range of X and Y variables. ? double results[ MAX_Y ] [ MAX_X ] will hold the results of calling the function with particular values of X and Y. In particular, results[ i ][ j ] will hold the result of calling the function with Y[ i ] and X[ j ] Need help either starting it off or some tips on where to go after declaring functions!!!!!!!!!!!!!!!!!!!Explanation / Answer
FOLLOW THIS math.ceil(x) Return the ceiling of x as a float, the smallest integer value greater than or equal to x. math.copysign(x, y) Return x with the sign of y. On a platform that supports signed zeros, copysign(1.0, -0.0) returns -1.0. New in version 2.6. math.fabs(x) Return the absolute value of x. math.factorial(x) Return x factorial. Raises ValueError if x is not integral or is negative. New in version 2.6. math.floor(x) Return the floor of x as a float, the largest integer value less than or equal to x. math.fmod(x, y) Return fmod(x, y), as defined by the platform C library. Note that the Python expression x % y may not return the same result. The intent of the C standard is that fmod(x, y) be exactly (mathematically; to infinite precision) equal to x - n*y for some integer n such that the result has the same sign as x and magnitude less than abs(y). Python
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.