Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static bool IsInMultiplicationTable(int checkedNum, int tableSize)
- {
- if (checkedNum == 1)
- {
- return true;
- }
- if (checkedNum <= tableSize * tableSize && checkedNum > 0)
- {
- for (int divisionNum = 2; divisionNum <= tableSize; divisionNum++)
- {
- if ((checkedNum <= divisionNum * tableSize) &&
- (checkedNum % divisionNum == 0))
- {
- return true;
- }
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment