Site hosted by Angelfire.com: Build your free website today!

Bonus #15

C++
K. Dzwonkiewicz

 

 

Bonus Number 15

 

Write a program that searches all numbers between 1…1000 and finds the one with the MOST factors.

 

You will need an outside loop that will be…

for(x=1;x<1002;++x)

 

An inside loop y, that will go from 1 to x, checks if the modulus x%y == 0

 

Keep track of factor count and the particular number and print the winner.