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

Function sub_array

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

Source from the content-addressed store, hash-verified

1#include<bits/stdc++.h>
2using namespace std;
3int sub_array(int arr[], int n){
4 for (int i = 0; i < n; ++i)
5 {
6 for (int j = i; j <= n; ++j)
7 {
8 for (int k = i; k < j; ++k)
9 {
10
11 cout<<arr[k]<<", ";
12 }
13 cout<<endl;
14 }
15 }
16 return 0;
17
18}
19
20int main(){
21 initial();

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected