Please, see below your code modified on how to print numbers divisible by 3.
Also, your description talks about a vector, but your implementation uses an array. Double-check if this is what you want to do.
#include <iostream>
using namespace std;
const int SIZE = 5;
int c[SIZE], h, i;
int main()
{
for (i = 0; i < SIZE; i++)
{
cout << "Enter a number: ";
cin >> c[i];
}
cout << "Numbers divisible by 3:";
for (i = 0; i < SIZE; i++)
{
if (c[i] % 3 == 0)
cout << " " << c[i];
}
return 0;
}