help

This code just terminated after this part can some please tell me why?


void indhenta(double a[Nmax],int m){
int i;
for(i=m;i>=0;i--){
cout<<endl<<"indtast a:"<<i; cin>>a[i];
}
dont use the "help " as your title
What is the size of the array a? If m is the array size, then the largest element index in the array would be m-1.

1
2
3
4
5
6
7
void indhenta(double a[Nmax],int m){
int i;
for(i=m;i>=0;i--)
{
cout<<endl<<"indtast a:"<<i; 
cin>>a[i];
}
@krrish123 +1

Aceix.
If you don't want to help, then why waste time replying?
Topic archived. No new replies allowed.