summaryrefslogtreecommitdiff
path: root/1_anno/Programmazione_1/ex08.cc
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-02-06 19:56:36 +0100
committerSanto Cariotti <santo@dcariotti.me>2021-02-06 19:56:36 +0100
commitd2edbc38cac8da52f58c5cd3da6c0c625fa05736 (patch)
treea51e9a4e56fc9d4c7c9e37576dceedca3a0c72b4 /1_anno/Programmazione_1/ex08.cc
parent98f34040820dc3a964b7be59a698323e8cc6c8a3 (diff)
conf: rename
Diffstat (limited to '1_anno/Programmazione_1/ex08.cc')
-rw-r--r--1_anno/Programmazione_1/ex08.cc36
1 files changed, 0 insertions, 36 deletions
diff --git a/1_anno/Programmazione_1/ex08.cc b/1_anno/Programmazione_1/ex08.cc
deleted file mode 100644
index fdfea92..0000000
--- a/1_anno/Programmazione_1/ex08.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <iostream>
-#include <stdio.h>
-#define N 3
-#define M 5
-
-using namespace std;
-
-bool func(int A[N][M], short k, short w) {
- short counter = 0;
- for(int i = 0; i < M; ++i) {
- short t_counter = 0;
- for(int j = 1; j < N; ++j) {
- if(A[j][i] < A[j-1][i])
- break;
- else
- ++t_counter;
- }
-
- if(t_counter >= k)
- ++counter;
- }
-
- return counter >= w;
-}
-
-int main() {
- int array[N][M] = {
- {5, 7, 9, 10, 5},
- {10, 2, 3, 4, 10},
- {16, 34, 21, 23, 1}
- };
-
- cout << func(array, 2, 1) << endl;
-
- return 0;
-}