chillurbrain

Task3_7_2

Dec 21st, 2015
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "stdafx.h"
  2. #include <conio.h>
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. void showArray(int array[], int size)
  8. {
  9.     int* start = array;
  10.     int* end = start + size;
  11.     while(start != end)
  12.     {
  13.         cout << *start;
  14.         start++;
  15.     }
  16. }
  17.  
  18. int main()
  19. {
  20.     const int SIZE = 5;
  21.     int array[SIZE];
  22.     for(int i = 0; i < 5; i++)
  23.         cin >> array[i];
  24.     showArray(array, SIZE);
  25.     _getch();
  26.     return 0;
  27. }
Add Comment
Please, Sign In to add comment