I would include the following code lines in bold to your code. It should work.
using namespace std;
int main(int argc, char *argv)
cout<< "Put a whole number"<<endl;
if (num >= 1) //Use if statement as a filter to filter out negative numbers that are less than 0.
juan_i = 0;
juan_p = juan_i*num;
cout<<juan_i<<" x "<<num<<" = "<<juan_p<<endl;
cout << "That is not a valid number!" << endl; // Use this as else statement, you can write anything saying that the number has to be positive.