1. Why does the following program output -1? #include #include #include void main(){ system("cls"); long a = 2147483647; printf("%d", a); } 2. Write a program to calculate and display the y intercept of a point lying on a straight line using printf() (only one is allowed) and arithmetic operators where slope is 4, x coordinate is -1, and y coordinate in -6. a. Without using variables. b. With variables. 3. Write a program to calculate and display the slope of a straight line between two points i.e. (–2, 4) and (1, 2) respectively in a two-dimensional plane using the printf() (only one is allowed) and arithmetic operators. a. Without using variables. b. With variables. 4. Write a program to calculate and display the result of a second order equation where …show more content…
You can use the last two digits of your registration number as the value of x. a. Without using variables. b. With variables. 5. Write a program to determine discriminant (using appropriate arithmetic operators) of a second order equation where the values of constants a, b, and c are 1, 6, and 5 respectively. (Hint: use nested ternary operators). Display Message Condition There are two real roots. Where the value of discriminant > 0 There is one real root. Where the value of discriminant = 0 There are two complex roots. Where the value of discriminant < 0 a. Without using variables. b. With variables. 6. Generate the following truth table using logical operators: A B AND OR NAND NOR 0 0 0 0 1 1 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0
5. Write the program to implement your algorithm. Test your program using your test cases. Did your program produce the values predicted in your test cases? Explain.
So the answer would be X = 4. So 4 would be the only answer.
A1.4. B Write and graph an equation for a line given the slope and the y-intercept, the slope and a point on the line, or two points on the line, and translate between forms of linear equations
To answer this problem, first I needed to gather important information about what they told me in the document. The information I got was the height of the MCLC library balcony which was 417 inches and and the x and y data table which x represents the number of rubber bands they used and y the jumping distance the barbie reached for each of the rubber bands they used. My plan was to make a graph to find the slope of the line. Then with the slope, I needed to make an equation that best its the table and graph.
|Take another look at part b. because rounding i to a small number of decimal places, such as 0.007 or 0.0067, would have resulted |
8. Write a pseudocode statement that assigns the sum of 10 and 14 to the variable total.
Maximum quantity of stock items is replenished at T0=0 during the first replenishment cycle. The inventory level declines in time interval [0, t1] due to stock-dependent demand and deterioration. It reached zero at t = t1 and shortages takes place for the duration of the time interval [t1, T] and accumulated until t = T1.
____1.The slope of a line that passes through the points (10, 15) and (20, 7) is
2) Draw a line 5 cm long and label the points A and B (.
#include using namespace std; int main() { double BMI = 0.0; // BMI Values cout << "\nUnderweight : less than 18.5" << endl; cout << "\nNormal : between 18.5 and 24.9" << endl; cout << "\nOverweight : between 25 and 29.9" << endl; cout << "\nObese : 30 or greater" << endl; double weight;// define the variable weight in pounds cout << "\nPlease enter your weight in Pounds.\n" << endl; cin >> weight;// get the user's weight in Pounds cout << "lbs" << endl; double height;// define the variable height in Inches cout << "\nPlease enter your height in Inches.\n" << endl; cin >> height;// get the user's height in Inches cout << "Inches" << endl; cout << "\nPlease enter your height in Feet.\n" << endl; cin >>
For my “Non-function Piece-wise Function” project, I decided to use a miniature Christmas tree as my object. Right after tracing the object onto my graph paper, I calculated the equation of each line segment. In order to find the equations of each line segment, I first had to find the slope of the lines. To find the slope, I picked two obvious points from a line segment and plugged it into the slope equation. Finally, I plugged in the slope that I figured out into the “point-slope form” equation along with one point of my choice, and finally got the equation.
3.Open textbook to page 214 and choose 5 key terms. Define the term and explain where you would use this feature in an Excel worksheet.
The graph represents a student’s reading growth. The student’s baseline has been recorded from the median of the first three probes taken. Starting at the baseline, the student’s expected progress has been made using an aim line. The anticipated growth rate for the student in second grade is 1.1. The graph represents a student who is not reaching their weekly growth rate and needs further intervention.
= total_rainfall + number_of_inches number_of_months = number_of_years * 12 display “number of months is” number_of_months display “total rainfall is” total_rainfall display “average rainfall is” (total_rainfall / number_of_months) Assignment #6 1. Calculate_Area() rectangle_area = input_width * input_length return rectangle_area main() Display “Enter rectangle width:”