djelad1

Untitled

Nov 13th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. const int SIZE = 10;
  4. void main()
  5. {
  6. {
  7. cout << "Hello, please enter " << SIZE << " numbers : ";
  8. int arr[SIZE] = { 0 }, i = 0;
  9. for (i = 0; i < SIZE; i++)
  10. cin >> arr[i];
  11.  
  12. for (int j = 0; j < SIZE; j++)
  13. {
  14. if (j % 2 == 0)
  15. {
  16. arr[j] += 1;
  17. cin >> arr[j];
  18. }
  19. }
  20. for (int j = 0; j < SIZE; j++)
  21. {
  22. cout << arr[j];
  23. }
  24. system("pause");
  25. system("CLS");
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment