I have a question for prime factorization since I am being asked to validate the input to exclude anything that is a string, character, or a negative number using a do loop
The problem states "Write a program that asks the user for an integer and then prints out all its prime factors. For example, when the user 84 the program should print
2
2
3
7
Validate the input to make sure that it is not a character or a string or a negative number using a do loop
The program I use is Dev C++ 6.3
read it in as a string, see if it is a number .. for positive values, its just isdigit for all of them since no decimal, minus sign, or other junk would be allowed. then factor it if valid.