Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "1.h"
- #include "2.h"
- using namespace std;
- int n;
- int *mas;
- int **mas2;
- int sz1, sz2;
- int *st;
- int k = 0;
- long long sum = 0;
- int main () {;
- //read(mas, st,n);
- //cout << "even elements multiply " << multiply_el(mas, n);
- //cout << "elemts sum beatween first and last zero " << summ(st,mas,n, k) << endl;
- cout << "Enter number of ticket:" << endl;
- int num1, num2;
- cin >> num1;
- cout << "Enter number of subproblem:" << endl;
- cin >> num2;
- if (num1 == 1 && num2 == 1) {
- make_matr(mas2, sz1, sz2);
- cout << cnt(mas2, sz1, sz2) << endl;
- } else if (num1 == 1 && num2 == 2) {
- make_matr(mas2, sz1, sz2);
- cout << max_sum (mas2, sz1, sz2) << endl;
- } else if (num1 == 2 && num2 == 1) {
- read(mas, st, n);
- cout << multiply_el(mas, n) << endl;
- } else if (num1 == 2 && num2 == 2) {
- read(mas, st, n);
- cout << summ(st, mas, n) << endl;
- } else {
- cout << "Try again";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment