subject

1. implement a function double root(double a, double b, double c) which returns:
2. implement a function void root(double a, double b, double c, double& x1, double& x2) which assigns two solutions of quadratic equation to variables x1 and x2 . where a , b and c are real numbers. the 2 solutions are:
3. write the pre-condition and post-condition for two functions above (in questions 1 and 2).
4. implement a function void my_swap(int& a, int& b) . it swap two values of the actual parameters.
5. write a void function definition for a function called zero_both that has 2 reference parameters, both of which are variables of type int , and sets the values of both variables to 0 .
6. write a stub for function double totalprice(double single_price, int total_items) .
7. write a function int sum(int n) ; which will return the sum of 1+2+…+n where n is a positive integer.
8. write the pre-condition and post-condition of above function.
9. write an if statement to halt to program if the program fails to open a file. assume the file to be opened has name stats. dat .

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 05:00
Write a loop that reads positive integers from standard input and that terminates when it reads an integer that is not positive. after the loop terminates, it prints out, on a line by itself and separated by spaces, the sum of all the even integers read, the sum of all the odd integers read, a count of the number of even integers read, and a count of the number of odd integers read, all separated by at least one space. declare any variables that are needed. assume the availability of a variable, stdin, that references a scanner object associated with standard input. that is, stdin = new scanner(system.in); is given.
Answers: 3
question
Computers and Technology, 22.06.2019 19:20
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_balance should be removed since header files should not contain constants.c)the definition of cashregister should be removed since header files should not contain class definitions.d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
question
Computers and Technology, 23.06.2019 09:20
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
You know the right answer?
1. implement a function double root(double a, double b, double c) which returns:
2. implemen...
Questions
question
Mathematics, 16.07.2019 16:00
question
Mathematics, 16.07.2019 16:00
Questions on the website: 13722367