Question

In: Electrical Engineering

      Design an algorithm for each of the exercises and type it into a word document....

      Design an algorithm for each of the exercises and type it into a word document. Upload the document to PE1 assignment folder.

  1. The roots of quadratic equation:

Design an algorithm to find the real roots of a quadratic equation of the form ax2+bx+c=0, where a, b, c are all real numbers and a is nonzero

Solutions

Expert Solution

Algorithm to find the real roots of a quadratic equation of the form ax^2+bx+c=0,where a,b,c are all real numbers and a is nonzero

ALGORITHM:

  1. Start
  2. Declare the required variables which are needed
  3. Read the coefficients a,b,c of the given quadratic equation
  4. Calculate d=b^2-4ac
  5. IF d<0,display “roots for the given quadratic equation are imaginary” & goto step 6

else

Calculate x1=(-b+sqrt(d))/2a

x2=(-b-sqrt(d))/2a

  1. Display real roots x1,x2
  2. stop

Related Solutions

Name a type of document that can be created with Microsoft Word.
Name a type of document that can be created with Microsoft Word. Using what you have learned from practice, describe the functions of Microsoft Word that aid you in creating the document you named. Describe how you would use the Word functions for creating your document.
For questions 1 through 10: On a word document (Document 1), identify what type of TVM...
For questions 1 through 10: On a word document (Document 1), identify what type of TVM problem(s) are being used from the following list: • Present value • Future value • Present value of an annuity • Future value of an annuity • Annuity of a present value • Interest rate Identify the financial calculator you are using and list the keys to be used to solve the problem, including an answer. 2. Bob wants to propose marriage to Sue....
Exercises a - b refer to the recursive algorithm SelectionSort (a.) In one part of algorithm...
Exercises a - b refer to the recursive algorithm SelectionSort (a.) In one part of algorithm SelectionSort, the index of the maximum item in a list must be found. This requires comparisons between list elements. In an n-element (unsorted) list, how many such comparisons are needed in the worst case to find the maximum element? How many such comparisons are needed in the average case? (b.) Defining the basic operation as the comparison of list elements and ignoring the amount...
Name a type of document that can be created with Microsoft Word. Using what you have...
Name a type of document that can be created with Microsoft Word. Using what you have learned from practice, describe the functions of Microsoft Word that aid you in creating the document you named. Describe how you would use the Word functions for creating your document.
It is good practice to put on each page of each type of document any of...
It is good practice to put on each page of each type of document any of the following except: 1-list of the changes made to the document. 2-a sequential revision number. 3-the initials of the person who made the changes. 4-No answer text provided.
Design document for a MinHeapCreate a design document and run a manual paper and pencil...
Design document for a MinHeapCreate a design document and run a manual paper and pencil approach to the implementation, insert and deletion of a MinHeap.Use the input values:50, 30, 45, 15, 65, 25, 10, 25, 15, 5Part-11. Show insert of each item to the Heap implemented as array and show all the state of the array on the process of each insertion.2. Show the first index and the last index of the heap in your array.3. Show the formed array...
What is a design document? What is included in a design document? How is it useful...
What is a design document? What is included in a design document? How is it useful for training? Customer service training involves far transfer. What design features would you include in a customer service training program to ensure that transfer of training occurred? What is a curriculum road map? Why is it important?
What is a design document? What is included in a design document? How is it useful...
What is a design document? What is included in a design document? How is it useful for training?
What is a design document? What is included in a design document? How is it useful...
What is a design document? What is included in a design document? How is it useful for training?
Answer each question completely. Copy and Paste the SPSS output into the word document for the...
Answer each question completely. Copy and Paste the SPSS output into the word document for the calculations portion of the problems, highlighting correct answers. (Please remember to answer the questions you must interpret the SPSS output). A researcher is interested to learn if there is a linear relationship between the hours in a week spent exercising and a person’s life satisfaction. The researchers collected the following data from a random sample, which included the number of hours spent exercising in...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT