Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Write a program in C. Requirements: Program must compile with both -Wall and -Werror options enabled Submit only the files requested Use doubles to store

Write a program in C. image text in transcribed
image text in transcribed
Requirements: Program must compile with both -Wall and -Werror options enabled Submit only the files requested Use doubles to store real numbers Print all doubles to 2 decimal points unless stated otherwise Problem Description Multiply two complex numbers together. Complex numbers have the form Afi + B where A is the imaginary part of the number B is the real part of the number i is the imaginary unit and i*i=-1 Your program should ask the user for 2 complex numbers, multiply them together, and then display the result Assumptions All input is valid The examples provided do not represent all possible input you can receive So make sure to test thoroughly on your machine Additional Notes There can be any number of spaces between a, the plus sign, b, and i and your program should be able to handle this Examples In the examples below user input has been underlined. You don't have to do any underlining in your program. It is just there to help you differentiate between what is input and what is output Example 1 Enter the first complex number in the form ai + b: 5i + 3 Enter the second complex number in the form ai + b: 2i + 4 (5i + 3) + (2i + 4) = 26i + 2 Example 2 Enter the first complex number in the form ai + b: 10 i + 3 Enter the second complex number in the form ai + b: 61+1 (10i + 3) + (6i + 1) = 28i + -57 Example 3 Enter the first complex number in the form ai + b: 1i+2 Enter the second complex number in the form ai + b: 3 1 + 4 (li + 2) (3 + 4) = 10i + 5

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students explore these related Databases questions