From 5e7dad9483683223caa5f3b4c950b3e687ad6df2 Mon Sep 17 00:00:00 2001 From: Jas <12792882+Spikatrix@users.noreply.github.com> Date: Sun, 6 Oct 2019 14:52:05 +0530 Subject: [PATCH] Improved grammar and whitespace for prompts --- Maths/PrimeCheck.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Maths/PrimeCheck.java b/Maths/PrimeCheck.java index dc357dac..3093894a 100644 --- a/Maths/PrimeCheck.java +++ b/Maths/PrimeCheck.java @@ -6,17 +6,17 @@ public class PrimeCheck { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); - System.out.println("Enter n:"); + System.out.print("Enter a number: "); int n = scanner.nextInt(); if (isPrime(n)) { - System.out.println(n + "is prime number"); + System.out.println(n + " is a prime number"); } else { - System.out.println(n + "is not prime number"); + System.out.println(n + " is not a prime number"); } } /*** - * Check a number is prime or not + * Checks if a number is prime or not * @param n the number * @return {@code true} if {@code n} is prime */