编程复数i
‘壹’ C语言中复数怎么定义 我想用i*i=-1
用一个结构体分别定义它的实部和虚部,然后再定义运算规则即可。
‘贰’ I复数形式
“I ”的复数是“We”
we英[wi]美[wi]
pron.我们
词语用法
pron. (代词)
we是复数第一人称代词的主格形式,其宾格形式是us。在句中用作主语时须用主格形式; 用作宾语时用宾格形式; 用在动词be后作表语时有时可用主格形式,有时可用宾格形式,如we作为后面句子的真正主语而被强调,则须用主格形式。
we有时可不翻译。
例句
It was we who had been wrong.
是我们错了。
We had much rain last year.
去年雨量充足。
(2)编程复数i扩展阅读:
近义词的用法
our英['aʊə(r) ]美['aʊər]
adj.我们的
词语用法
pron. (代词)
our是第一人称复数形容词性物主代词,只可用作定语。
例句
用作形容词 (adj.)
This is our classroom.
这是我们的教室。
Our school is on a river.
我们的学校在河边。
‘叁’ 想知道i复数是什么呢
“I”的复数是“We”,“We”是我们的意思,是第一人称的复数形式。
其他人称的复数形式举例列表如下:
英语复数相关后缀
-s
-s是最常见的名词复数后缀,比如:
computer—computers
某些以-s结尾的名词却并不是某个单数形式的变形,而是一个独立的形式,如:news,shorts,summons,billards,works,trousers。其中动词可能是单数也可能是复数,视词的具体情况而定。
这类词一般都是源于复数形式-s,但summons是源于法语阴性过去分词sumunse。
-es
某些名词复数由-es构成,比如box—boxes。
与-s类似,某些以-s结尾的名词却并不是某个单数形式的变形,而是一个独立的形式,如clothes。
‘肆’ i的复数形式是什么
i的复数形式是we,具体释义如下:
读音:英[wi; wiː]、美[wi]
表达意思:作代词时意为“我们(主格);笔者,本人(作者或演讲人使用);朕,寡人”,作名词时意为“人名;(缅)韦”。
词性:通常在句中用作名词和代词。
固定搭配:We Are The World天下一家;The Way We Were往日情怀
例句:
So, I guess we have to do this.
那么,我想我们不得不这么做。
We boast of what we have and do.
我们夸耀我们所拥有的和所做的。
We should help him rather than he should help us.
是我们应该帮助他而不是他应该帮助我们。
‘伍’ C#复数的编程
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Management;
namespace ConsoleApplication1
{
class Program
{
class Complex
{
public Complex() { realPart = 0; imaginaryPart = 0; }
public Complex(float real, float imaginary) { realPart = real; imaginaryPart = imaginary; }
public override string ToString()
{
string result = realPart.ToString();
if (imaginaryPart >= 0) result += "+";
result += imaginaryPart.ToString() + "i";
return result;
}
static public Complex operator +(Complex a, Complex b)
{
Complex result = new Complex();
result.realPart = a.realPart + b.realPart;
result.imaginaryPart = a.imaginaryPart + b.imaginaryPart;
return result;
}
static public Complex operator -(Complex a)
{
Complex result = new Complex(-a.realPart, -a.imaginaryPart);
return result;
}
static public Complex operator -(Complex a,Complex b)
{
return a + (-b);
}
static public Complex operator *(Complex a, Complex b)
{
Complex result = new Complex ();
result.realPart = (a.realPart * b.realPart) - (a.imaginaryPart * b.imaginaryPart);
result.imaginaryPart = (a.realPart * b.imaginaryPart) + (a.imaginaryPart * b.realPart);
return result;
}
static public Complex operator /(Complex a, Complex b)
{
Complex result = new Complex();
Complex Conjugal = new Complex(b.realPart, -b.imaginaryPart);
float denominator = (b.realPart * b.realPart) + (b.imaginaryPart * b.imaginaryPart);
result = a * Conjugal;
result.realPart /= denominator;
result.imaginaryPart /= denominator;
return result;
}
private float realPart;
private float imaginaryPart;
}
static void Main(string[] args)
{
Complex a = new Complex(3, 5);
Complex b = new Complex(2, 3);
Console.WriteLine(a.ToString());
Console.WriteLine(b.ToString());
Console.WriteLine((a + b).ToString());
Console.WriteLine((a - b).ToString());
Console.WriteLine((a * b).ToString());
Console.WriteLine((a / b).ToString());
}
}
}
‘陆’ I 的复数是什么
“I”的复数是“We”,“We”是我们的意思,是第一人称的复数形式。
其他人称的复数形式举例列表如下:
(6)编程复数i扩展阅读:
1、集体名词,以单数形式出现,但实为复数。例如:people、police、cattle 等本身就是复数,不能说 a people,a police,a cattle,但可以说a person,a policeman,a head of cattle。
2、由一个词加 man 或 woman构成的合成词,其复数形式也是 men 和women,如an Englishman,two Englishmen。但German不是合成词,故复数形式为Germans;Bowman是姓,其复数是the Bowmans。
‘柒’ C++编程,定义一个复数类
//complex类
#include<iostream.h>
#include<math.h>
class complex{
double real,imag;
public:
complex(){real=5;imag=5;}//缺省构造函数
complex(double r){real=r;imag=0;}//只给实部赋值的构造函数
complex(double r,double i){real=r;imag=i;}//同时给实、虚部赋值的函数
double displayreal(){return real;}//返回复数实部
double displayimag(){return imag;}//返回复数虚部
complex operator+(complex c);//实现复数相加
complex operator-(complex c);//实现复数相减
complex operator*(complex c);//实现复数相乘
double cab(complex c);//求复数绝对值(模)
complex sqr(complex c);//求复数平方根
friend ostream &operator<<(ostream &out,complex &obj);//实现复数的输出
};
complex complex::operator+(complex c)//实现复数相加
{
real+=c.real;
imag+=c.imag;
return *this;
}
complex complex::operator-(complex c)//实现复数相减
{
real-=c.real;
imag-=c.imag;
return *this;
}
complex complex::operator*(complex c)//实现复数相乘
{
real=real*c.real-imag*c.imag;
imag=real*c.imag+imag*c.real;
return *this;
}
double complex::cab(complex c)//求复数绝对值(模)
{
double ri;
ri=sqrt(c.real*c.real+c.imag*c.imag);
return ri;
}
complex complex::sqr(complex c)//求复数平方根
{
real=sqrt((cab(c)+c.real)/2);
imag=sqrt((cab(c)-c.real)/2);
return *this;
}
ostream &operator<<(ostream &out,complex &obj)//实现复数的输出
{
if(obj.imag==0)out<<obj.real;
else out<<obj.real<<"+"<<obj.imag<<"i";
return out;
}
void answer(double a,double b,double c)//求根函数
{
complex answer1,answer2;
double an=b*b-4*a*c;
if(an>=0)
{
answer1=complex((-b+sqrt(an))/(2*a));
answer2=complex((-b-sqrt(an))/(2*a));
}
else
{
answer1=complex(-b/(2*a),sqrt(-an)/(2*a));
answer2=complex(-b/(2*a),-sqrt(-an)/(2*a));
}
cout<<"The answer is:"<<endl;
cout<<answer1<<" and "<<answer2<<endl;
}
int main()//主函数
{
complex a,b(2),c(6,9);//以下测试类中定义的各个函数,你可以删除的
cout<<"a="<<a<<", b="<<b<<", c="<<c<<endl;
c=a+b;
cout<<"a+b="<<c<<endl;
cout<<"a="<<a<<", b="<<b<<", c="<<c<<endl;
c=a-b;
cout<<"a-b="<<c<<endl;
cout<<"a="<<a<<", b="<<b<<", c="<<c<<endl;
c=a*b;
cout<<"a*b="<<c<<endl;
cout<<"a="<<a<<", b="<<b<<", c="<<c<<endl;
cout<<"cab(a)="<<a.cab(a)<<endl;
cout<<"a="<<a<<", b="<<b<<", c="<<c<<endl;
cout<<"sqr(a)="<<a.sqr(a)<<endl;//以上测试类中定义的各个函数
answer(1,1,1);//方程解为虚数的情况
answer(1,3,1);//方程解为实数的情况
return 0;
}
‘捌’ 编程中i和j代表什么
你这个代码是画一个半个的半个的菱形吧~
(*^__^*) 嘻嘻……其实i就是代表有几行,那j呢就代表了这几行我有几个星星喽
‘玖’ matlab 中复数如何表示我i前面已经有*就是表示不出来不知到为什么
你i是不是已经被定义为变量了,正常i就是复数单位,可以这样表示的.
‘拾’ matlab中的复数i怎么输入
i是虚数单位,这是一个复数。如果你确定结果应该是实数而且程序没错的话,可能因为浮点数误差的关系出现一个非常非常小的虚部,用real(a)直接把它去掉即可。
复数x被定义为二元有序实数对(a,b),记为z=a+bi,这里a和b是实数,i是虚数单位。