Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int array1[3] = { 10 ,2, 8 };
- int array2[3] = { 0 ,2, 10 };
- int acu1, acu2;
- acu1 = acu2 = 0;
- for (int i = 0; i <= 2; i++) {
- acu1 += array1[i];
- acu2 += array2[i];
- }
- if (acu1 > acu2) {
- cout << "El array mas grande es el 1";
- }
- else {
- cout << "El array mas grande es el 2";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement