Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help me in Solving these questions in C++ using Functions (modules for example) by calling them in the main function am out of time its

help me in Solving these questions in C++ using Functions (modules for example) by calling them in the main function

am out of time its a homework and i dont know what to do i appreciate your help

You can use this ID 920019000 and Name : Alex for the questions

image text in transcribed

image text in transcribed

a) Write a function that accepts the rectangular coordinates of two points(x1, y1) and (x2, y2), and calculates the distance d between them, where b) Use the previous function in a program that reads 5 pairs of points from the user, calculates the distance between each pair of points and save the coordinates of (xi yl x2 y2 d). Use your name and ID as a file name. c) Show how to modify your program to get and display the maximum and the minimum distance d in the file created in the part b. d) Modify the function to calculate the slope m and the distance d (use call by reference) Q2: The polar coordinates of a point consist of the distance, r, from a specified origin and an angle with respect to the x-axis. The point's x and y coordinates are related to its polar coordinates by these formulas: x = r cos Using these formulas: Write a function named calculate_xy (Use call by reference) to calculate the x and y coordinates of a point with polar coordinates r and ( in degrees) write a program to get several values for r and from the user and call the function calculate_xy for conversion, the program stops if the user enters negative value for r. Also display r, , x and y with 3 digits after the decimal point

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Describe How to Develop and Communicoie o Vision.

Answered: 1 week ago