1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kupik [55]
3 years ago
10

Write a program that prompt the user to enter the coordinate of two points (x1, y1) and (x2,y2), and displays the slope of the l

ine that connects the two points.
Computers and Technology
1 answer:
zzz [600]3 years ago
3 0

Answer:

Here is code in C++.

//include headers

#include <bits/stdc++.h>

using namespace std;

//main function

int main() {

//variables to store coordinates

float x1,x2,y1,y2;

cout<<"Please Enter the coordinate of first point (x1,y1): ";

// reading coordinate of first point

cin>>x1>>y1;

cout<<"Please Enter the coordinate of second point (x2,y2): ";

// reading coordinate of second point

cin>>x2>>y2;

//calculating Slope of the line that connects these points

float m=(x2-x1)/(y2-y1);

cout<<"Slope of the line that connects these two points is :  "<<m<<endl;

}

Explanation:

Declare four variables x1,x2,y1,y2 to store the coordinate of both points.

Read the coordinate of both the point from user. Calculate the slop of the

line which connects these two points with the formula m=(x2-x1)/(y2-y1).

Output:

Please Enter the coordinate of first point (x1,y1): 1 3                                                                                                        

Please Enter the coordinate of second point (x2,y2): 5 12                                                                                                      

Slope of the line that connects these two points is :  0.444444  

You might be interested in
My mom works from home selling her craft work online to people all over the world. She can do this from home because we have acc
postnew [5]
The computer and a device
7 0
3 years ago
Read 2 more answers
Who is responsible for keeping your facility in compliance? A) Technicians B) Supervisors C) Owners D) All of the above
zhenek [66]

Based on my personal experience in the workforce, all of the above would be the correct answer. That's based off my experience though. Owners would regularly come in and talk to our managers and employees to make sure everything was kept in order and in compliance. The only other answer I could see fit would be supervisors. Hope I was able to help :)

3 0
2 years ago
A common and extremely useful feature of most online dictionaries is
choli [55]
A common and extremely useful feature of most online dictionaries is <em />interoperable browser.
4 0
3 years ago
if a person walks 10 metres due to south in 10 seconds 10 due east in the next 10 seconds and transmitted you're not in the next
Scorpion4ik [409]

Answer:

\frac{1}{3}\ m/s

Explanation:

The computation of the velocity by using the following formula is

As we know that

Velocity = \frac{Displacement}{Total\ time\ taken}

where,

Displacement is 10 meters

Total time taken is 30 seconds

Now placing these values to the above formula

So, the velocity of Dash is

= \frac{10\ meters}{30\ seconds}

= \frac{1}{3}\ m/s

We simply applied the above formula so that we can get the velocity and the same is to be considered

5 0
3 years ago
Variable index has a value of 4, and variable accessValid has a value of False. What value does variable, accessPoints, have aft
snow_lady [41]

Answer:

10

Explanation:

If index is greater than or equal to 2, accessPoints will increase by 10 even if accessValid is false because the if statement states that if index is greater than or equal to 2 OR accessValid is true. The if statement gets executed if either expression is true, and index is greater than 2 because index has a value of 4.

8 0
2 years ago
Other questions:
  • Which of the following is NOT one of the most important elements when designing a website?
    8·2 answers
  • _____ refer(s) to computer programs that provide instructions for a computer to execute a desired task. Answer .a.Software .b. I
    7·1 answer
  • Which of the following can you do under the fair use exceptions?
    6·1 answer
  • Which technology was used in fourth generation of computer​
    13·2 answers
  • Write a program that implement a bubble sort ?
    5·1 answer
  • The basic work area of the computer is it screen that you when you first fire up your computer
    6·1 answer
  • List 5 anti-virus products currently in use
    15·1 answer
  • How does the financial market impact the economy?
    10·1 answer
  • Write a method for the Invitation class that accepts a parameter and uses it to update the address for the event.
    9·1 answer
  • How did technology change the world
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!