djelad1

Untitled

Nov 14th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. const int SIZE = 10;
  4. const int SIZE2 = 5;
  5. const int SIZE3 = 5;
  6. const int SIZE4 = 5;
  7. void main()
  8. {
  9. cout << "answer question No.6\n\n";
  10. int arr[SIZE2], arr2[SIZE3], arr3[SIZE4], i, j, g, counter = 0;
  11. cout << "please enter " << SIZE2 << " numbers: ";
  12. for (i = 0; i < SIZE2; i++)
  13. {
  14. cin >> arr[i];
  15. }
  16. cout << "please another " << SIZE3 << " numbers: ";
  17. for (j = 0; j < SIZE3; j++)
  18. {
  19. cin >> arr2[j];
  20. }
  21. for (g = 0, i = 0, j = 0; g < SIZE4; j++, i++, g++)
  22. {
  23. arr3[g] = arr2[j] + arr[i];
  24. cin >> arr3[g];
  25. cout << arr3[g];
  26. }
Advertisement
Add Comment
Please, Sign In to add comment