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 =...
write a program that asks the user to enter two integers one at a time if the first value is not an integer then do not ask for a second then display both values otherwise print error message stating which value entered was not an integer python
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 small program that asks the user how many asterisks it should print out. The user responds with a number, then the program prints that number of asterisks. The number of asterisks to print should be stored in a variable. Finally the program asks the user if it should start over, and repeats as many times as the user wants. The prompt to run the program again should look like the one below, and should wait at the end...
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...
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...