Computer Science, asked by aashiseesu123, 1 day ago

write a program to print the numbes between 10 and 50 which are divisible by both 3 and 5.​

Answers

Answered by samarthkrv
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 Amnaafi
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