Use pointer to const to display an array of constant values of type double

#include<iostream>
using namespace std;

int main()
{
const int size=5;
const double array[size]={9,5,3,2,7};
const double *ptr=array;

for(int i=0;i<size;i++)
{
cout << *ptr << endl;
ptr++;
}

}