Ryan is appearing for a techathon that offers price money of 10K for the winner. Techathon has provided a platform where an incomplete code will appear, and the participants have to complete it. Ryan got a program in c++ where he needs to create a complex calculator. Can you help Ryan win this competition?
Answers
Answered by
0
Below are given the three cases.
Explanation:
#include <iostream>
Using namespace std; int main()
{ int a,b,c,d,n;
C in>>n>>a>>b>>c>>d;
switch(n) {
The conditions in case number one are given as:
Case 1:
Count<<(a+c)<<"+"<<(b+d)<<"i";
break;
Now the conditions in case number two are given as:
Case 2:
Count <<(a-c)<<"-"<<(b-d)<<"i";
break;
Now the conditions in case number three are given as:
Case 3:
Count <<((a*c)-(b*d))<<((b*c)+(a*d))<<"i"; break;{ }
Similar questions