mga idol baka pwede patulong sa syntax kung pano yung sum of two arrays salamat po in advance
#include <iostream>
using namespace std;
int main()
{
int even[5];
int odd[5];
int sum;
cout<<"Enter Elements in Array 1:"<<endl;
for(int index1=0; index1<5; index1++){
cout<<"index["<<index1<<"]:";
cin>>even[index1];
}
cout<<"\nEnter Elements in Array 2:"<<endl;
for(int index2=0; index2<5; index2++){
cout<<"index["<<index2<<"]:";
cin>>odd[index2];
}
cout<<"\nElements 1: " <<endl;
for(int index1=0; index1<5; index1++){
cout<<even[index1];
}
cout<<"\n\nElements 2: " <<endl;
for(int index2=0; index2<5; index2++){
cout<<odd[index2];
}
cout<<"\n\nSum of two Arrays";
return 0;
}
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.