Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- const int N = 5;
- int A[N] = { 5, 9, 3, 2, 8 };
- int B[N] = { 20, 15, 14, 22, 11 };
- int tempA = A[0];
- int tempB = B[0];
- for (int i = 0; i < N; i++) {
- for (int j = 0; j < N; j++){
- if (A[i] > A[j]) {
- tempA = A[i];
- }
- }
- }
- cout << tempA << endl;
- system("pause");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment