From 770ba8eb39a0ac26b630bc08aa4ad07d22217139 Mon Sep 17 00:00:00 2001 From: PIYUSH KHURANA <52041719+PIYUSH-01@users.noreply.github.com> Date: Wed, 23 Oct 2019 22:21:21 +0530 Subject: [PATCH] Update problem_8.cpp --- problem_8/problem_8.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/problem_8/problem_8.cpp b/problem_8/problem_8.cpp index 64edb8f..962d5ed 100644 --- a/problem_8/problem_8.cpp +++ b/problem_8/problem_8.cpp @@ -1 +1,20 @@ -//Wirte your code logic here! \ No newline at end of file +int breakingRecords(int n, int scores[]) +{ + int max, min, max_count=0, min_count=0, max_now; + min = max = max_now = scores[0]; + for(int i=1; i max_now) + { + max_count++; + max_now = scores[i]; + } + } + cout<