• We just launched and are currently in beta. Join us as we build and grow the community.

Divisible by 2,3,0 and 5

SupremeDre

LOL Virtuoso
S Rep
0
0
0
Rep
0
S Vouches
0
0
0
Vouches
0
Posts
162
Likes
75
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 200 XP
QUEZON CITY POLYTECHNIC UNIVERSITY
673 Quirino Highway, Barangay San Bartolome, Novaliches, Quezon City

5. There are some techniques that Mathematician use to know if a number is divisible by another number. Some rules are stated below.

2 The last digit of the number must be divisible by 2.
3 The sum of the digits when added must be divisible by 3 (works for at least 2 digit numbers).
5 The last digit must end with 0 or 5.

With the rules above, write a program that allow a user to enter a numeric value higher than 9 and less than 10,000 (maximum of 4 digits only) and will identify if that number is divisible by 2, 3 and/or 5.

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.

2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

 

452,496

337,656

337,664

Top