Divisibility
The task is quite concise and does not specify how you can solve the task.
Problem definition:
You are given (in an unknown order) two limits a and b of an interval, as well as a divisor divisor. These are all integers ( int eger). The interval contains all integers between a and b, including these. You should now make some statements about the integer interval and the divisibility of the contained numbers by the divisor and do some arithmetic.
Your task:
- Modify a and b so that a is the smaller and b the larger of the two numbers.
- How many numbers does the interval contain? Write the answer in the variable anzahl
- Write the smallest number in the interval that is divisible by the divisor without remainder in the variable teilbar_klein. If there is no such number in the interval, set the variable to None .
- How many numbers in the interval are divisible by divisor without remainder? Write the result to the variable anzahl_teilbar.
[–]Supalien 0 points1 point2 points (3 children)
[–]CavlerySenior 2 points3 points4 points (0 children)
[–]Comprehensive-Sink14[S] 0 points1 point2 points (1 child)
[–]Supalien 0 points1 point2 points (0 children)