Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- //Your function called MultiplyByIndex goes here
- void AddTwoArrays(int inputArray[], int otherInputArray[], int outputArray[], int arraySize)
- {
- for (int i = 0; i < arraySize; i++)
- {
- outputArray[i] = inputArray[i] + otherInputArray[i];
- std::cout << outputArray[i] << ", ";
- }
- }
- int main()
- {
- int first_integer_array[7] = { 10, 15, 7, 4, 13, 19, 8 };
- int second_integer_array[7] = { 10, 15, 7, 4, 13, 19, 8 };
- int output_array[7] = {};
- AddTwoArrays(first_integer_array, second_integer_array, output_array, 7);
- std::cout << std::endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment