Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <cmath>
- #include <complex>
- using namespace std;
- int p(double q, int p = 2) { return p + q; }
- void q(int *&p, int *&q) { cout << *p++ << *q-- << " "; }
- double p(double r, double p, int q = 1) { return r - q * p; }
- int &r(double (*u)(double), int &v, int &w, int &s) {
- cout << setw(5) << v << w << s << endl;
- cout<<"w="<<w<<"::s="<<s<<"\n";
- v = w + s;
- s = v + w;
- cout<<"v="<<v<<"\n";
- cout << w << "!!"<<v << s << endl;
- w = (*u)(w);
- return v;
- }
- void s(complex<double> q) { cout << q << endl; }
- int main() {
- int u[] = {4, 6, 8, 9, 2, 4, 7, 1, 3, 8};
- int *w(&u[3]), *x(u + 1), *y(w + 6);
- s(2); s(complex<double>(2, 2));
- while(x <= y) q(x, y);
- cout << endl << p(3, 2) << " " << p(2, 3, 3.2) << " " << p(2.3)
- << " " << p(3, 2.) << endl;
- r(sqrt, u[2], *u, w[-1]) += 2;
- cout << w[-1] << " " << *u << " " << u[2] << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement