Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Information Science and Engineering
用类和友元函数来实现复数的加法和乘法
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB
Total submit users: 225, Accepted users: 216
Problem 10497 : No special judgement
Problem description
  用类和友元函数来实现复数的加法和乘法

Input
  输入数据有若干行。每行上有四个数,前两个表示一个复数的实部和虚部,后两个表示另一个复数的实部和虚部。

Output
  对于每一组数据,输出两复数的和与积,格式参照样例输出。

Sample Input
1 2 3 4
2 1 4 -1
Sample Output
4+(6i)
-5+(10i)
6+(0i)
9+(2i)
Submit   Clarifications   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:2035 today,16258762 total, since 2010-05-07