#include using namespace std; void readdata(int k, int a[], int b[]); void myswap(int &a, int &b); void sortvalues(int a[], int k); void readdata(int k, int a[], int b[]) { for(int i=0; i> a[i]; cout << a[i] << endl; cin >> b[i]; cout << b[i] << endl; } } void myswap(int &a, int &b) { int temp; temp=a; a=b; b=temp; }; void sortvalues(int a[], int k) { bool swapped=false; do { swapped=false; // Go through all the elements except the very last element. for(int i=0; ia[i+1]) { myswap(a[i],a[i+1]); swapped=true; } } } while(swapped); } int main () { int n; int array1[50]; int array2[50]; cin >> n; readdata(n,array1,array2); sortvalues(array1,n); sortvalues(array2,n); if(n>0) { cout << "Largest: "; if(array1[n-1]>array2[n-1]) cout << array1[n-1] << endl; else cout << array2[n-1] << endl; } return 0; }