MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / max

Function max

CPP/array-2d/find_max.cpp:3–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include<iostream.h>
2using namespace std;
3void max(int arr[5])
4{
5 int max[5];
6 max[0]=0;
7 int k=0;
8 for(int i=0;i<5;i++)
9 {
10 if(arr[i]>max[k])
11 max[k]=arr[i];
12 }
13 cout<<"maximum number is:"<<max[k];
14}
15int main(){
16 int arr[5],i;
17 cout<<"enter members of an array:"<<endl;

Callers 15

mainFunction · 0.70
largestsubarray_sumFunction · 0.70
kadaneFunction · 0.70
prefix_sumFunction · 0.70
mainFunction · 0.50
mainFunction · 0.50
GridPaths.cppFile · 0.50
RemovingDigits.cppFile · 0.50

Calls

no outgoing calls

Tested by 1

kidsWithCandiesMethod · 0.40