You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#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];
}
The text was updated successfully, but these errors were encountered:
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.
#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];
}
The text was updated successfully, but these errors were encountered: