零人桐 發表於 2014-8-3 22:23
我抓到錯誤嘞~~
零人桐 發表於 2014-8-3 22:23
我抓到錯誤嘞~~
#include<iostream>
#include<complex>
#include<iomanip>
#include<cmath>
using namespace std;
int main(){
complex<double>a,b;
double img,real;
char d;
cin>>img>>real;
a = complex<double>(img,real);
cin>>d;
cin>>img>>real;
b = complex<double>(img,real);
switch(d){
case'+':a+=b;break;
case'-':a-=b;break;
case'*':a*=b;break;
case'/':a/=b;break;
}
/**/
}
歡迎光臨 竹園論壇 (http://forum.tfcis.org/) | Powered by Discuz! X3.2 |