Program is in C++
#include<iostream>
using namespace std;
main()
{
float a1,a2,b1,b2;
cout<<"Enter slope and y intersect of line1";
cin>>a1>>b1;
cout<<"Enter slope and y intersect of line 2";
cin>>a2>>b2;
if(a1==a2) //checking if lines are parallel
cout<<"Line are parallel and they wont intersect"
else
{
cout<<"They will intersect at"
x=( ( b2 - b1) / ( a1 - a2 ));
y = a1*x+b1;
cout<<x<<" "<<y;
}
}
Write a program that asks the user the slope and y-intersect of one line y =...
Python Write a program which asks the user keep inputting values on a line followed by enter until they enter a blank line, at which point the program should print the number of lines entered (excluding the blank).
Find the point at which the line fix)--2x-3 intersects the line g(x) -x (x, y) =(1-3,-x Recall that whhen two lines intersect, their point of intersection has the same y-coordinate as well as the same x-coordinate. Thus, if rx)-y and g(x)-y, then fx)-g(x). What are the two expressions in terms of x that are set equal to each other and then solved for x?
2. We say that two curves intersect orthogonally if they intersect and their tangent lines are orthogonal at each point in the intersection. For example, the curve y = 0 intersects the curve x2 + y2-1 orthogonally at (-1,0) and (1,0). Let H be the set of curves y2b with b ER. (a) Prove that the tangent line of each curve in H at a point (r, y) with y / 0 has slope (b) Let y -f(x) be a...
2. We say that two curves intersect orthogonally if they intersect and their tangent lines are orthogonal at each point in the intersection. For example, the curve y = 0 intersects the curve x2 + y2-1 orthogonally at (-1,0) and (1,0). Let H be the set of curves y2-2.2-b with b є R. (a) Prove that the tangent line of each curve in H at a point (x, y) with y 0 has slope - (b) Let y-f(x) be a...
This is C++ programming.
Create the following files: point.h – contains the definition for the point struct. A point consists of an x and y coordinate line.h – contains the definition and prototypes for the line class. A line consists of two points. Getters and setters are not required. However, you do need: 1. A constructor 2. A slope method, which returns the slope of the line 3. An intersect with method, which calculates, and returns, the point of intersec-...
Write a program in Python that asks the user for the ISBN of the book in the format xxx-x-xxx-xxxxx-x. To validate: Initialize a total to 0 Have the program remove the dashes so that only the 13 digits are left in the ISBN string for each index of the first 12 digits in the 13 digit ISBN string get the digit at the current index as an integer If the current index is an even number, add the digit to...
Write python program using IDLE Write a full program that asks the user to enter his/her name then repeatedly ask to enter the temperature in Fahrenheit and convert it to Celsius, the program should then prompt the user if he/she wants to continue or exit the program. The formula for the conversion is: °C = (°F - 32) x 5/9 The program should use a function for the conversion. An Example of a sample run should appear on the screen...
Write a PYTHON program that asks the user for the name of the file. The program should write the contents of this input file to an output file. In the output file, each line should be preceded with a line number followed by a colon. The output file will have the same name as the input filename, preceded by “ln” (for linenumbers). Be sure to use Try/except to catch all exceptions. For example, when prompted, if the user specifies “sampleprogram.py”...
C++
Write a program that asks for a number and then prints as many
lines as the user inputs. Each line contains as many pairs of
characters ("*#") as the number of this line. It should look like
the right half of a pyramid. Your version of the program must print
the same result as the expected output. To to this lab, you must
use two do-while loops.
Two exceptions:
When the user inputs a number less than 1, then...
write inputs and outputs
declare variables
promt user
b. Modify the program written for Exercise 9a to determine wener e eReTeO evenly divisible by a user-specified value, with no remainder. That is, is it evenly divisible by 3, 7, 13, or any other user-specified value? 10. (Data processing) As a part-time student, you took two courses last term. Write, run, and test a C++ program that calculates and displays your grade point average (GPA) for the term. Your program should...