The code below compiles and runs but it doesn't do what I want it to do. I want it to print each element of the array with 3 spaces in between. Instead, it is printing all five elements received from the keyboard and three spaces. What do I need to change or add??
//input 5 digit number and print each number separated by 3 spaces
#include <iostream.h>
#include <iomanip.h>
int main()
{
const int SIZE = 4;
int number[SIZE];
cout << "Please enter a 5 digit number: ";
for(int i=0;i<SIZE;i++)
{cin >> number[i];
cout << number[i] << " ";}
return 0;
}