Format code with prettier (#3375)

This commit is contained in:
acbin
2022-10-03 17:23:00 +08:00
committed by GitHub
parent 32b9b11ed5
commit e96f567bfc
464 changed files with 11483 additions and 6189 deletions

View File

@ -8,6 +8,7 @@ Krishnamurthy number is also referred to as a Strong number.
import java.io.*;
public class KrishnamurthyNumber {
//returns True if the number is a Krishnamurthy number and False if it is not.
public static boolean isKMurthy(int n) {
@ -44,8 +45,12 @@ public class KrishnamurthyNumber {
}
public static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter a number to check if it is a Krishnamurthy number: ");
BufferedReader br = new BufferedReader(
new InputStreamReader(System.in)
);
System.out.println(
"Enter a number to check if it is a Krishnamurthy number: "
);
int n = Integer.parseInt(br.readLine());
if (isKMurthy(n)) {
System.out.println(n + " is a Krishnamurthy number.");