Skip to content

Find last element of array #363

@9982108331

Description

@9982108331

#include<bits/stdc++.h>
using namespace std;
int main()
{
cout<<"Enter number of elements in array";
int n;
cin>>n;
int array[n];
cout<<"Enter elements in array";
for(int i=0;i<n;i++){
cin>>array[i];
}
cout<<array[n-1];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions