Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ CHALLENGE ACTIVITY 2.11.3: Using math functions to calculate the distance between two points. Determine the distance between point (x1, y1) and point (x2, y2),

image text in transcribed

image text in transcribed

c++

CHALLENGE ACTIVITY 2.11.3: Using math functions to calculate the distance between two points. Determine the distance between point (x1, y1) and point (x2, y2), and assign the result to points Distance. The calculation is: Distance (x2 x1)2 + (y2 yl)2 Ex: For points (1.0, 2.0) and (1.0, 5.0), points Distance is 3.0. 28 236599 axzay 1 test passed All tests passed 1 #include 2 #include 3 using namespace std; 4 5 int main() { 6 double X1; 7 double yi, 8 double x2; 9 double y2; double xDist; 11 double yDist; 12 double pointsDistance; 13 xDist = 0.8; 15 yDist = 0.01 16 pointsDistance = 0.0; 17 18 cin> ) X13 10 AW NHL 00 14 cin >> x1, cin >> y1, cin >> x2; cin >> y2; Your solution goes here */ cout

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

Recommended Textbook for

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago