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....
Design an algorithm ( pseudocode or C ) to calculate the frequency of each of the...
Design an algorithm ( pseudocode or C ) to calculate the frequency of each of the vowels (lowercase and uppercase) in a text. The program will ask the user for a text, which will be entered by keyboard and will save, in a table (in%), the frequency of each of the vowels within the text, taking into account all the characters of the text. The text will end with the character '' # ''. Includes the emty sequence.
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.
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...
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?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT