Quality Papers

Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

I wrote a code that is supposed to do the following.Write a

I wrote a code that is supposed to do the following.Write a program that calculates and displays all factors of a number with a function. A factor is any number that divides into a number evenly.For examples: Factors of 20 are 1,2,4,5,10,20For the program:Prompt the user for a number or use an inputCall a function to calculate all factors using loops and conditionals and modulusDisplay all factors to the pageIf the factor is Even : Print it in GreenIf The Factor is Odd : Print it in Red________________________________________________________________________________________I tried everything but the code doesn’t seem to work, I would like to know whats wrong with the code.The biggest issue I had is get the input to follow the script and I didn’t know how to do so.My code:

A demonstration of how to access a Number field

Can't find what you are looking for?

Post your question on solvingessays and get help from one of our expert tutors in topics ranging from mathematics to rocket science!