Demo entry 6353088

taversing_array

   

Submitted by Shahriar Rifat on Mar 28, 2017 at 20:44
Language: C++. Code size: 324 Bytes.

#include<bits/stdc++.h>

using namespace std;
void traverse(int ara[], int LB, int UB) {
    for(int i = LB; i<= UB; ++i) printf("%d ", ara[i]);
    puts("");
}
int main()
{
    int ara[1000], n;
    scanf("%d",&n);
    for(int i = 1; i<=n; ++i) scanf("%d", &ara[i]);
    traverse(ara, 1, n);
    return 0;
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).