prestige

Untitled

Jun 15th, 2013
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. #include <iostream>
  2. #include "1.h"
  3. #include "2.h"
  4. using namespace std;
  5. int n;
  6. int *mas;
  7. int **mas2;
  8. int sz1, sz2;
  9. int *st;
  10. int k = 0;
  11. long long sum = 0;
  12. int main () {;
  13. //read(mas, st,n);
  14. //cout << "even elements multiply " << multiply_el(mas, n);
  15. //cout << "elemts sum beatween first and last zero " << summ(st,mas,n, k) << endl;
  16. cout << "Enter number of ticket:" << endl;
  17. int num1, num2;
  18. cin >> num1;
  19. cout << "Enter number of subproblem:" << endl;
  20. cin >> num2;
  21. if (num1 == 1 && num2 == 1) {
  22. make_matr(mas2, sz1, sz2);
  23. cout << cnt(mas2, sz1, sz2) << endl;
  24. } else if (num1 == 1 && num2 == 2) {
  25. make_matr(mas2, sz1, sz2);
  26. cout << max_sum (mas2, sz1, sz2) << endl;
  27. } else if (num1 == 2 && num2 == 1) {
  28. read(mas, st, n);
  29. cout << multiply_el(mas, n) << endl;
  30. } else if (num1 == 2 && num2 == 2) {
  31. read(mas, st, n);
  32. cout << summ(st, mas, n) << endl;
  33. } else {
  34. cout << "Try again";
  35. }
  36. return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment