How can this problem be solved using arrays alone? (without functions or anytheing else) i couldnt figure out how to display the arrays side by side. Declare two integer arrays list1 and list2 of size 10. Fill both arrays with the random numbers from 5 to 25. Display two arrays side to side as shown in the sample output. Input an integer n Check if if n is found in any of the arrays and print its location if it is found. Please note that your output will be different because the arrays are initialized randomly Sample input / output: Array #1 - Array #2 25 9 8 5 Array #1 - Array #2 6 25 5 5 25 23 25 20 25 5 Enter a number: 13 Enter a number: 17 13 was found in 1 arrau Location of 13 in Array #1 : 2 17 was found in both arraus Location of 17 in Array #1: 9 Location of 17 in Array #2: Solution #include <iostream> #include <cstdlib> /* srand, rand */ #include <ctime> // time #include<iomanip> using namespace std; int main() { int list1[10],list2[10],n,flag1 = 0,flag2=0,pos1 = -1,pos2=-1; srand(1000); for(int i=0;i<10;i++){ list1[i] = rand()%21+5; list2[i] = rand()%21+5; } cout<<\"Array #1 - Array #2\"<<endl; for(int i=0;i<10;i++){ cout<<\" \"<<list1[i]<<\" \"<<list2[i]<<endl; } cout<<\"Enter a number : \"; cin>>n; for(int i=0;i<10;i++){ if(list1[i]==n){ flag1 = 1; pos1 = i; break; } } for(int i=0;i<10;i++){ if(list2[i]==n){ flag2 = 1; pos2 = i; break; } } if(flag1 && flag2){ cout<<n<<\" was found in both arrays\"<<endl; cout<<\"Location of \"<<n<<\" found in array #1 :\"<<pos1<<endl; cout<<\"Location of \"<<n<<\" found in array #2 :\"<<pos2<<endl; } else if(flag1){ cout<<n<<\" was found in 1 array\"<<endl; cout<<\"Location of \"<<n<<\" found in array #1 :\"<<pos1<<endl; } else if(flag2){ cout<<n<<\" was found in 1 array\"<<endl; cout<<\"Location of \"<<n<<\" found in array #2 :\"<<pos2<<endl; } else cout<<n<<\" was not found in any array\"<<endl; return 0; } .