void main(){ int i,j; scanf("%d",&i); if((i%5)==0) printf("the given number is divisible by 5); }
To check for divisibility, use the modulus, or % operator. If the expression results in zero, then the first number is divisible by the second number. For example, 10%5 equals 0 because 10 is divisible by 5. When the expression does not result in 0, the number is not divisible(10%7=3, so 10 is not divisible by 7).
12345 1234 123 12 1
Using while loop, write a program which calculates the product of digits from 1 to 5 and also show these no's vertically.
Write a program which takes the temperature in farhenheight.the program should display the farhenheight temperature as well as centigrade. C= (f-32)*5/9
To write a program that accepts 5 integers in an array and calculates the average of the first three, you can follow these steps: First, create an array to hold the 5 integers. Then, prompt the user to input the integers and store them in the array. Finally, compute the average of the first three integers by summing them and dividing by 3, and display the result. Here’s a simple example in Python: numbers = [int(input("Enter integer {}: ".format(i + 1))) for i in range(5)] average = sum(numbers[:3]) / 3 print("Average of the first three integers:", average)
2390 is not divisible by 3 but is divisible by 5. 2 + 3 + 9 + 0 = 14; 1 + 4 = 5: 5 is not divisible by 3, so 14 is not divisible by 3, so 2390 is not divisible by 3. 2390 ends with a 0, so 2390 is divisible by 5.
A number that is divisible by 15 is divisible both by 5 and 3 A number is divisible by 5 if it ends with 0 or 5 A number is divisible by 3 if the sum of its digits is divisible by 3 e.g. 4035 is divisible by 15 as it ends with a 5 and 4+0+3+5=12 which is divisible by 3
230 or 260
It is divisible by 2 & 3. It is not divisible by 5, 9 & 10. 534 is even → divisible by 2 5 + 3 + 4 = 12 → divisible by 3 534 does not end in 0 or 5 → not divisible by 5 5 + 3 + 4 = 12 → not divisible by 9 534 does not end in 0 → not divisible by 10
15 is divisible by 3 and 5.
it's not divisible by neither 5 or 3
yep it is because 2 is divisible by 2 and 3 is divisible by 3 and 0 is divisible by 5 have fun suckers!
It is divisible by 2 and 3. It isn't divisible by 5 and 10.
To determine if 535 is divisible by 3, you can add the digits together: 5 + 3 + 5 = 13. Since 13 is not divisible by 3, 535 is also not divisible by 3. Therefore, 535 is not divisible by 3.
To check for divisibility, use the modulus, or % operator. If the expression results in zero, then the first number is divisible by the second number. For example, 10%5 equals 0 because 10 is divisible by 5. When the expression does not result in 0, the number is not divisible(10%7=3, so 10 is not divisible by 7).
Is 5225 divisible by 3? A number is divisible by 3, if the sum of its digits is evenly divisible by 3. 5 + 2 + 2 + 5 = 14. Since 14 is not divisible by 3, neither is 5225.
Here's a simple Java program to find numbers from 50 to 100 that are divisible by 5: public class DivisibleByFive { public static void main(String[] args) { for (int i = 50; i <= 100; i++) { if (i % 5 == 0) { System.out.println(i); } } } } This program uses a for loop to iterate through numbers from 50 to 100 and checks if each number is divisible by 5 using the modulus operator. If it is, the number is printed to the console.