I am trying to work on this problem where I have to compare two arrays, and print out 'equal' or 'not equal' for each element in both arrays that is/are equal or not equal. So for this, I have 2 integers that are equal and 2 that are not equal. So it has to print out: not equal, equal, not equal, and equal. Thanks!
#include <iostream>
using namespace std;
int main() {
int firstArray[4] = {5, 15, 25,30};
int secondArray[4] = {2, 15, 20, 30};
Get rid of the "return 0" (you don't need it in main) or at least put it at the very end, before the closing brace.
Right now, it's inside the loop so your program quits at the end of the first iteration.