chillurbrain

Task8_7_1

Dec 22nd, 2015
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <conio.h>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     const int SIZE = 3;
  9.     int array[SIZE];
  10.     int* pointer = array + SIZE - 1;
  11.     for(int i = 0; i < SIZE; i++)
  12.         cin >> array[i];
  13.     while(pointer >= array)
  14.     {
  15.         cout << pointer << " " << (int)(pointer - array) << " " << *pointer << endl;
  16.         pointer--;
  17.     }
  18.     _getch();
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment