Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find last element of array #363

Open
9982108331 opened this issue May 19, 2020 · 2 comments
Open

Find last element of array #363

9982108331 opened this issue May 19, 2020 · 2 comments

Comments

@9982108331
Copy link

#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];
}

@Avinash9k5r
Copy link

Avinash9k5r commented Aug 23, 2020

Hello @9982108331
This code is working fine but you need to add "cout<<endl;" after line no 5 , 9 and 12. So that it looks proper on the console.
If you need help, I am willing to work on this issue if you want.

@Sajal193
Copy link

Hi @9982108331. Can I work on this.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants