Question
How many numbers in the range from 150 to 1000 are
divisible by 5, 10, and 20?Solution
ATQ;
If a number is a multiple of 5, 10, and 20, then the number is a multiple of the L.C.M of 5, 10, and 20.
L.C.M of 5, 10, and 20 = 20
Smallest multiple of 20 between 150 and 1000 = 160
Largest multiple of 20 between 150 and 1000 = 1000
Common difference = 20
Let the required number of terms be 'n'.
So, 160 + (n - 1) × 20 = 1000
Or, n - 1 = (1000 - 160) ÷ 20 = 42
So, n = 42 + 1 = 43
So, there are 43 numbers between 150 and 1000 which are multiples of 5, 10, and 20.
How can you pass command-line arguments to a shell script?
Which command displays the manual page for another command?
Star schema consists of:
What does #!/bin/bash at the start of a script mean?
How do you access the value of a variable named `USERNAME` in a shell script?
Extended globbing in bash allows:
How do you access the value of a variable named `USERNAME` in a shell script?
Which of the following is the syntax for an `if` statement checking if a variable `NUM` is numerically equal to 5?
In shell scripting, which symbol is used to redirect the standard output to a file, overwriting its contents?
Which ETL process step validates and cleans data before loading?