Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- const int SIZE = 10;
- const int SIZE2 = 5;
- const int SIZE3 = 5;
- const int SIZE4 = 5;
- void main()
- {
- cout << "answer question No.6\n\n";
- int arr[SIZE2], arr2[SIZE3], arr3[SIZE4], i, j, g, counter = 0;
- cout << "please enter " << SIZE2 << " numbers: ";
- for (i = 0; i < SIZE2; i++)
- {
- cin >> arr[i];
- }
- cout << "please another " << SIZE3 << " numbers: ";
- for (j = 0; j < SIZE3; j++)
- {
- cin >> arr2[j];
- }
- for (g = 0, i = 0, j = 0; g < SIZE4; j++, i++, g++)
- {
- arr3[g] = arr2[j] + arr[i];
- cin >> arr3[g];
- cout << arr3[g];
- }
Advertisement
Add Comment
Please, Sign In to add comment