About 78,000 results
Open links in new tab
  1. While loop program in python for storing values divisible by 10

    Jan 2, 2020 · num % 10 is 0 for numbers divisible by 10. if num % 10 evaluates to False for numbers divisible by 10, so your list will contain numbers not divisible by 10. You should use if num % 10 == 0: …

  2. Write a while loop that prints all positive numbers that are divisible ...

    Oct 7, 2021 · Write a while loop that prints all positive numbers that are divisible by 10 and less than a given number n Asked 4 years, 2 months ago Modified 3 years ago Viewed 5k times

  3. Counting number divisible by 10 in an array - Stack Overflow

    Feb 16, 2017 · 2 I was given an assignment that made me create 3 methods that created an array, print an array, and count all the numbers divisible by 10 in a array. The part that is giving me the most …

  4. Design DFA accepting binary strings divisible by a number 'n'

    Jan 22, 2019 · For those interested to read further about possible mini states for number n and base b, read paper: Divisibility and State Complexity. Design a DFA for base 'b' encoded integers divisible by …

  5. Print the numbers from 1-100 skipping the numbers divisible by 3 & 5

    Nov 13, 2018 · 1 I want to print numbers from 1-100 skipping the numbers divisible by 3 & 5 and when I use the code-1 I'm not getting the correct output, I am getting full counting 1-100

  6. Using a while loop to check divisibility of a range of numbers

    Mar 14, 2022 · I am trying checking the divisibility of 5 and 7 for the numbers in the range from 1 to 41 using a while loop. I know that there are other options, such as a for loop, but I would like to …

  7. If the number is divisible by 10 then print Yes Otherwise, print No

    Jun 24, 2023 · You are provided an array A of size N that contains non-negative integers. Your task is to determine whether the number that is formed by selecting the last digit of all the N numbers is …

  8. Finding a number that is divisible by all numbers from 1 through 10 …

    The least common multiple of the values between 1 and 10 is what you are looking for. To do this, all you have to do is multiply each number by the next, so you would have 1*2*3*4...*9*10. This will …

  9. How do you check whether a number is divisible by another number?

    2 You can use % operator to check divisiblity of a given number The code to check whether given no. is divisible by 3 or 5 when no. less than 1000 is given below:

  10. How to print numbers from 0 to 100 that are divisible by 3 and also 5?

    Jul 23, 2019 · 0 One optimization, number divisible by 3 and 5 must end with 0 or 5, so we can iterate with step=5 and check only if number is divisible by 3: