📄 calculus.edp
字号:
real x=3.14,y;int i,j;complex c;cout << " x = " << x << "\n";x = 1;y=2;x=y;i=0;j=1;cout << 1 + 3 << " " << 1/3 << "\n";cout << 10 ^10 << "\n";cout << 10 ^-10 << "\n";cout << -10^-2+5 << "== 4.99 \n";cout << 10^-2+5 << "== 5.01 \n";cout << "------------------ complex ---- \n" ;cout << 10-10i << " \n";int prec=cout.precision(12);cout.scientific << " scientific : \n"; cout << " -1^(1/3) = " << (-1+0i)^(1./3.) << " (precision=12)\n";cout.precision(prec);cout.fixed;cout.showpos << " fixed and showpos :\n";cout << " -1^(1/3) = " << (-1+0i)^(1./3.) << " (precision="<<prec << ")\n";cout.noshowpos << "noshowpos\n"; cout << " 8^(1/3)= " << (8)^(1./3.) << " \n";cout << " sqrt(-1) = " << sqrt(-1+0i) << " \n";complex a=10+1i;cout.default << "default \n";cout << a << endl;cout << " real(a) = " <<real(a) << " conj(a)" << conj(a) << " arg(a) = " << arg(a) << endl;cout << " ++i =" << ++i ;cout << " i=" << i << "\n";cout << " i++ = "<< i++ << "\n";cout << " i = " << i << "\n";// ---- string concatenation ---------- string str,str1; str="abc+"; str1="+abcddddd+"; str=str + str1; str = str + 2 ; cout << "str= " << str << "== abc++abcddddd+2;\n"; { real x=0; for (int i=0;i<10;i++) x += i*i; cout << " x= " << x << endl; // example of if arithmetic expression real a = x == 0 ? x : -1; real b = x != 0 ? x : -1; cout << " a = " << a << " b = " << b << endl; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -