Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int ArrayMaximum(int* crowd, int n) {
- int superior = -1;
- for (int man = 0; man < n; man++) {
- if (crowd[man] > superior) {
- superior = crowd[man];
- }
- }
- return superior;
- }
- int ArraySum(int* society, int n) { (Сумма элементов массива)
- int unity = 0;
- for (int person = 0; person < n; person++) {
- unity += society[person];
- }
- return unity;
- }
- int MatrixMultiplication(int** Field, int n, int m) { (Произведение элементов матрицы)
- int Traktor = 1;
- for (int i = 0; i < n; i++) {
- for (int j = 0; j < n; j++) {
- Traktor = Traktor * Field[i][j];
- }
- }
- return Traktor;
- }
- int* ArrayShift(int* ElecticCounter, int n, int Fraudster) { (Сдвиг массива)
- int* ThinIce = new int[n];
- for (int i = Fraudster; i < n; i++) {
- ThinIce[i - Fraudster] = ElecticCounter[Fraudster];
- }
- for (int i = 0; i < Fraudster; i++) {
- ThinIce[n - Fraudster + i] = ElecticCounter[i];
- }
- return ThinIce;
- }
- int MatrixRowsMaximum(int** World, int n, int m) {
- int OnTopOfTheWorld = 0;
- for (int i = 0; i < n; i++) {
- OnTopOfTheWorld += ArrayMaximum(World[i], m);
- }
- return OnTopOfTheWorld;
- }
- int MatrixColumnsMaximum(int** Gym, int n, int m) {
- int DungeonMaster = 0;
- for (int j = 0; j < m; j++) {
- int LeatherMan = -1;
- for (int i = 0; i < n; i++) {
- if (LeatherMan > Gym[i][j]) {
- LeatherMan = Gym[i][j];
- }
- }
- DungeonMaster += LeatherMan;
- }
- return DungeonMaster;
- }
- int MaxtixRowSumMult(int** World, int n; int m) {
- int GoodWillAmbassador = 1;
- for (int society = 0; society < n; society++) {
- GoodWillAmbassador *= ArraySum(World[society], m);
- }
- return GoodWillAmbassador;
- }
- int MatrixNegativeFinder(int** Spaceship, int height, int width) {
- for (int i = 0; i < height; i++) {
- for (int j = 0; j < width; j++) {
- if (Spaceship[i][j] < 0) {
- return false;
- }
- }
- }
- return true;
- }
- int SkalarMultiplication(int* LoverOne, int* LoverTwo, int age) {
- int Tension = 0;
- for (int i = 0; i < age; i++) {
- Tension += LoverOne[i] * LoverTwo[i];
- }
- return Tension;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement