Write a function named xytopolar

Assignment Help C/C++ Programming
Reference no: EM13703732

Program: Write a function named "XYtoPolar" that has 2 double value parameters and 2 double reference parameters that converts x,y coordinates to polar coordinates. The prototype is: void XYtoPolar(double x, double y, double* angle, double* radius);

Look up in a math book or on the Internet how to do the conversion mathematically and code that into your program.

The effect of the function is to take arbitrary values for x and y representing the coordinates of a point on the x,y plane and sets the variables pointed to by angle and radius to the corresponding polar coordinates of the same point, with the angle in radians, not degrees.

For case, the point x=1, y=1 has polar coordinates angle=0.785398163, radius = 1.41421356237.

Hint: the C math function atan(x) returns the inverse tangent of x.

Please keep it simple and short and no copy and paste or at least help me get started?

Reference no: EM13703732

Questions Cloud

Perform the subtraction : Perform the subsequent subtraction using 1's compliment and 2's compliment.
The combination of sodium chlorite and acetic acid forms : Problem- The combination of sodium chlorite and acetic acid forms hypochlorous acid (HOCl). Draw the arrow pushing mechanism of your reaction, using HOCl as reagent.
Build a 16-bit register with write enable input : Use 1-bit D-Flip flop to build a 16-bit register with write enable input - Use 16-bit registers to build a register le of 8 registers, enabling reading and writing operations.
Describe the properties in terms of polarity : Problem- What are the major compounds expected to be seen from spinach extract from column chromatography. Describe the properties in terms of polarity and structures
Write a function named xytopolar : Write a function named "XYtoPolar" that has 2 double value parameters and 2 double reference parameters that converts x,y coordinates to polar coordinates. The prototype is: void XYtoPolar(double x, double y, double* angle, double* radius);
Describe the ir spectrum of ketone product : Problem- Describe the difference between the IR spectrum of your ketone product (camphor), and that of the alcohol starting material (Isoborneol). How can these spectra help you determine whether the reaction worked
Difference between x and &x : Suppose x is defined as int x = 5; Explain in your own words what the difference between x and &x.
Write a function named putinorder : Write a function named "PutInOrder" that has 2 double reference parameters (say a and b). The function rearranges the values pointed to by a and b such that a points to the smallest value and b to the largest value.
Correlated sub-query to return one row per customer : Use a correlated sub-query to return one row per customer, representing the customer's oldest order (the one with the earliest date).

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Build a method for performing frequency analysis

Build a basic cipher base class that may be derived from for the ciphers and decode a Caesar Cipher text. You will have two cases.

  Design a class box that defines a box on a floor

Design a class box that defines a box on a floor. A box has a number and an (a,b) location where a and b are numbers between -5, and 5.

  Write c program that will input two values from the user

write c program that will input two values from the user with a prompt ? that are a value and a base with which you

  Create two arrays with ten random numbers

Determine the largest difference (only subtract corresponding index numbers) between these two arrays. (hint: create a third array with the differences)

  Prompt the user for 3 sentences of text

Prompt the user for 3 sentences of text. Pass these pieces of text into a function connect() which will connect all three sentences into one long sentence. Pass the combination sentence back to the main program, where it is printed.

  Define a function hypotenuse that calculates the hypotenuse

Define a function hypotenuse that calculates the hypotenuse of a right triangle when the other two sides are given. The function should take two arguments and return the hypotenuse as a double.

  Enter the temperature at noon of each of the five days

Write a program that allows each employee to enter the temperature at noon of each of the five days and displays the highest, lowest, and average (mean) temps.

  C -programming in what ways are the

in what ways are the initializationrepetition testand update steps alike for a sentinel-controlled loop and an

  Program for keeping course list for each student in college

Write a program for keeping a course list for each student in a college. The information about each student should be kept in an object that contains the student's name and a list of courses completed by the student.

  You should use pure recursive calls

You should use pure recursive calls completely and count the number of calls the program makes. You should count how many times recursive calls were made.

  Write program to calculate net pay for factory worker

Write and run a program in C++ that calculates the net pay for a factory worker. The program prompts the user for skill level and hours worked, as well as appropriate insurance and retirement options for the employee's skill.

  Program to compute and show miles per gallon

Create the program in C++ which will input miles driven and gallons used (both as integers) for each tankful. Program must compute and show miles per gallon.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd