Well just by looking at the information provided, you can tell that the equation would look like y = 4x -1. The y-intercept is -1 because the x value is 0. But if you want to see how to solve it algebraically, here’s an explanation... You need to substitute the y-intercept into the equation in order to solve for b, which would then complete the equation. Take the equation y=mx+b. Substitute in the slope and xy values, (-1) = 4(0) + b. Now the equation should look like this: -1 = b. So now that you have the value of b, the complete equation should be y=4x-1
// Input value is usernum.
// This code snippet sums 1 + 3 + 5 + ... + usernum
// The answer is stored in the variable summedvalue.
N = (int) (usernum+1)/2; // maximum number of integers to be summed
int *v = malloc(N*sizeof(int)); // allocate storage for array v
// Calculate the number of loop counts and assign array v..
count = 0;
k = 1;
while (1) {
if (k>usernum) { // do not extend v beyond usernum
break;
}
v(count) = k; // assign an odd integer to v, including usenum
count++;
k += 2; // k is an odd number
if k>usernum { // handle usernum as odd or even
k = usernum;
}
}
n = count; // the size of array v.
// Calculate the sum in a for loop
summedvalue = 0; // initialize summedvalue
for (i=0; i<=n; i++) {
summedvalue += v(i);
}
Cos(Angle) = Adjacent leg / Hypotenuse
Cos(X) = 3.5/4.6
X = arccos(3.5/4.6)
X = 40.46 degrees.
You would use the distributive property to solve the equation to remove exponets then to get your final equation.