Create array for which each object can hold integers in the range 0-100. You input a few numbers say 1 3 5 they are displayed as 0 1 0 1 0 1 0 0 0 0 up to 100.I can do a simple loop of zeros up to 100 but i cant display numbers in the 0 , 1 context portrayed above . Any help would be great. Thanks
#include<iostream>
using std::cout;
using std::endl;
#include<iomanip>
using std::setw;
int main()
{
int i,n[ 100 ];
for (i=0;i<100; i++)
n[ i ]=0; //intialize array
cout<<"Elements"<<setw(13)<<"Value"<<endl;
for (i=0; i <100; i++) // print array
cout<<setw(7)<<i<<setw(13)<<n[i]<<endl;
return 0;
}