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

  How many whole numbers they wish to enter

Write a program, which will ask the user how many whole numbers they wish to enter. The program will then read that many numbers, print them in the order they were entered, sort them in order by increasing value, and print them in sorted order.

  What does the term polymorphism mean

What does the term polymorphism mean and Use case models use two patterns - "Common Sub Behavior" and "Interrupts as Extensions." Explain these two patterns in your own terms and give an example for each pattern.

  Explain initialize variables counting the lines and letters

If the output file cannot open, exit the program. Initialize variables counting the lines and letters. Write a program that reads a given text file, outputs the text file as is, and also prints the number of lines and the number of times each lette..

  Write a function that permanently swaps two floats

Write a function that permanently swaps two floats using references.

  Write a program to calculate cars mileage

If you are using VisualStudio 2005, you should include time.h. The call to srand should use the time rather than a number entered by the user and looks like this: srand( static_cast(time( NULL )) ).

  Implement a program to find the position of a cannonball

Write a C++ program that calculates the position of a cannonball that is fired straight up in the air - Implement a program to find the position of a cannonball

  A stack is referred to as a last-in first-out

This lab, along with your TA, will help you navigate through designing, implementing, and testing a dynamic stack. Recall, a stack data structure is a restricted linked list, where only the top node in the stack may be accessed at any given time

  Complexity of quick sort algorithm

Write a c program to experimentally compare the O() complexities of the provided quick sort algorithm

  To overload a member function of the base class

To overload a member function of the base class A: the name of the function and the formal parameter list of the corresponding function in the derived class must be the same. B: the name of the function must be different

  Prepare a temperature converter

Have to write a small program that prompts the user to enter a temperature in degrees Fahrenheit and then prints a massage as to whether the alarm will sound at that temperature.

  Demonstrate overriding of their getter and setter methods

Organize following animals using classes and virtual function. tigers,crocodile, elephants,pythons,zebras,hawks, chickens,rabbits using at least 3 properties some of the animals share. demonstrate overriding of their getter and setter methods.

  Repeat these questions by writing functions

Repeat these questions by writing functions that receive the arrays as constant reference parameters and return the appropriate values through the function name (via return statement). The function header could look like:

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