qpham26
03-11-2013, 08:30 PM
Hi guys, I am trying to make a simple program that uses uses if statements to determine if the number, which can be obtain from a cell in the excel workbook, and test to see if the number is a prime or not.
I tried to test for divisibility using mod function, for 2 thru 9, but then i figure what if the input number is a square of some prime (13, 17, 23, etc.) or cube or any exponents. Then the if statement for divisibility will not be adequate.
Please help me with this. I have found the code that is written by microsoft for the same purpose, but that is not appropriate for my level, and I dont really understand it.
Thanks:help
I tried to test for divisibility using mod function, for 2 thru 9, but then i figure what if the input number is a square of some prime (13, 17, 23, etc.) or cube or any exponents. Then the if statement for divisibility will not be adequate.
Please help me with this. I have found the code that is written by microsoft for the same purpose, but that is not appropriate for my level, and I dont really understand it.
Thanks:help