Friday, August 17, 2018

TOO COMPLEX

       Problem Description

Ramya is always confused with complex numbers. Her maths professor gave two complex numbers and ask her to add them. She needs your help. Can you favour Ramya to complete this work?

CODING ARENA::

#include <stdio.h>
int main()
{
  int a,b,c,d;
  scanf("%d%d%d%d",&a,&b,&c,&d);
  printf("%d+%di",a+c,b+d);

            return 0;
}

    Test Case 1

Input (stdin)
3



4



6



7



Expected Output
9+11i
Test Case 2

Input (stdin)
1



7



5



2



Expected Output
6+9i


No comments:

Post a Comment