From 342cba60019ea6c25922befbe17eb8c2613855cc Mon Sep 17 00:00:00 2001 From: kr820js Date: Sun, 25 Feb 2024 16:15:04 +0100 Subject: [PATCH] first submition --- cv2/program.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 cv2/program.c diff --git a/cv2/program.c b/cv2/program.c new file mode 100644 index 0000000..f40eb1e --- /dev/null +++ b/cv2/program.c @@ -0,0 +1,49 @@ +#include +#include +#include +#include + +#define VELKOST_POLA 12 +int array_of_quontiti_of_drinked_limonades(int *pole,int *array_of_winers); + +int main(){ + int pole[VELKOST_POLA]; + memset(pole,0,VELKOST_POLA * sizeof(int)); + int array_of_winers[VELKOST_POLA]; + memset(array_of_winers,0,VELKOST_POLA * sizeof(int)); + int i=array_of_quontiti_of_drinked_limonades(pole,array_of_winers); + if(i==0){ + printf("ERROR"); + } + for(int j=0; j0){ + pole[i]=value; + counter_of_rided_values++; + if(pole[i]>bigest_score){ + bigest_score=pole[i]; + j=0; + } + if(pole[i]==bigest_score){ + array_of_winers[j]=i; + j++; + } + i++; + }else{ + break; + } + } + return j; +} +