Hi there I am writing this program but I can’t get it to even start to see if the other code has problems.
I have this:
int main()
{
int answer;
int test;
cout << "Please Enter the number to be tested: ";
cin >> test; //Gets number to be tested
cout << "here";
answer = factor(test);
cout << "The answer is:" << answer;
return 0;
}
now then. It will print out the first cout, and then it gets to the cin, takes the number but then won’t do anything. Won’t even print the second cout. Any ideas?
I”m pretty new and haven’t really done much so any extra treating me like an idiot explanations are welcomed. 😀 Thanks.
Maybe there is something wrong with the factor function? An infinite loop?
Then cout << “here” << endl; (to flush the output) should at least print “here”.