#include <iostream> /*Allows inputs and outputs to be made within the program*/
usingnamespace std; /*Activates the standard controls within the program*/
char g; /*Declares the g variable as char*/
int billy [5] = {1,2,3,4,5}; /*Declares the first array and sets the number of slots and whats in those slots*/
int chilli [5] = {5,4,3,2,1}; /*Declares the second array and sets the number of slows and whats in those slots*/
int total = 0; /*Declares the total variable and sets the default value*/
int main () /*First line that gets executed*/
{
for (int j=0; j<5; ++j)
{
for (int i=0; i<5; ++i)
{
if (billy[i] == chilli[j]);
{
++total;
}
}
}
cout << total << " Numbers(s) are the same"; /*Displays the amount of numbers that were the same in both arrays*/
cin >> g; /*Closes the program when the user enters any character*/
return 0; /*Terminates the program*/
}