All pastes #418573 Raw Edit

Anonymous

public text v1 · immutable
#418573 ·published 2007-03-31 18:10 UTC
rendered paste body
#include <iostream>
#include <stdlib.h>
#include <math.h>

using namespace std;

int main(void)

{
	double y1 = (0);
	double x1 = (0);
	double result1 = fabs(0);
	double y2 = (0);
	double x2 = (0);
	double result2 = fabs(0);
	double result = 0;
	
	cout << "Please enter the Y-axis to the first point ";
	cin >> y1;
	
	cout << "Please enter the X-axis to the first point ";
	cin >> x1;
	
	cout << "Please enter the Y-axis to the second point ";
	cin >> y2;
	
	cout << "Please enter the X-axis to the second point ";
	cin >> x2;
	
	result1 = y1 - y2;
	
	result2 = x1 - x2;
	
	result = result1 / result2;
	
	cout << "The slope is "; 
	cout << result <<endl;
	
	return 0;
	
}