Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- using namespace std;
- void kal1(int *u, int n) {
- float* mas = new float[n];
- for (int i = 0; i < n; i++) {
- cin >> mas[i];
- *u *= mas[i];
- }
- }
- void kal2(int *v, int m) {
- float* mas = new float[m];
- for (int i = 0; i < m; i++) {
- cin >> mas[i];
- *v *= mas[i];
- }
- }
- int main()
- {
- int u = 1, v = 1;
- int n, m;
- cout << "n:";
- cin >> n;
- cout << "m:";
- cin >> m;
- kal1(&u,n);
- kal2(&v,m);
- cout << pow(u,1.0/m)-pow(v,1.0/n);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement