Computer Science, asked by Kanare4845, 9 days ago

Write a program to print tenth numbers if summation of two numbers is divisible by 5 if remainder >5 else print previous 10th number in java language

Answers

Answered by r27272278
0

// Java program to find if a number

// is divisible by 5 or not

// importing Classes/Files

import java.util.*;

class GFG {

// Main Driver function

public static void main(String[] args)

{

// Taking any random number to test

int n = 464565625;

// Checking if remainder is 0 or not

// when divided by 5

if (n % 5 == 0)

// Print yes iif no is divisible by 5

System.out.println("Yes");

else

// Print no if no is not divisible by 5

System.out.println("No");

}

}

Output

yes

Similar questions