write a program to print the numbes between 10 and 50 which are divisible by both 3 and 5.
Answers
Answered by
2
Answer:
public class Main
{
public static void main(String[] args) {
for(int i = 10; i <= 50; i++){
if(i%3 == 0 && i%5 == 0){
System.out.print(i + " ");
}
}
}
}
Explanation:
Answered by
1
Answer:
public class Main
{
public static void main(String[] args) { for(int i = 10; i <= 50; i++){ if(i%3 0 && i%5 = 0){
System.out.print(i + " ");
}
Similar questions