Question
This repository can be compiled/executed directly after you clone it , however, it will give incorrect results/output. It requires the changes explained in this file
This repository can be compiled/executed directly after you clone it, however, it will give incorrect results/output. It requires the changes explained in this file in order to produce correct results. This repository is supposed to perform algebraic operations on 2 complex numbers, and :
addition i.e. function complex_add()
multiplication, i.e. function complex_mux() HINT:
Your task is to write both functions listed above. Do not modify the 2 functions' calling statement in the main(), as well as the 2 functions' name and the parameters (both in main.cpp and main.hpp). Write only the 2 functions' body. Do not alter the other lines including how your program is displayed on the terminal.
Marks
There are 2 test_xxx.cpp files that will be executed to test for your 2 functions above. Inside each of the test_xxx.cpp file, several test cases will be executed and your code needs to pass all of the test cases to get 2 marks. For 2 test_xxx.cpp files, you can either get 0, 2 or 4 marks (full marks)
Do not edit the other lines for any reason (e.g. to make it similar with your friend's question) since each of you will get a different set of question. In this case, you surely will get 0 mark.
Summary
To summarize, this program should be able to perform algebraic operations on 2 complex numbers. To achieve this, edit only inside the functions' body.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started