Java Program to check whether a given number is Prime or not using while loop
A whole number greater than 1 that cannot be exactly divided by any whole number other than itself and 1 is called a prime number. For Example: 3, 5, 7…
A whole number greater than 1 that cannot be exactly divided by any whole number other than itself and 1 is called a prime number. For Example: 3, 5, 7…
Positive whole numbers are called Natural numbers. In this program, we are trying to print all the natural numbers in reverse using a while loop starting from n to 1.…
In this tutorial, we will be learning to write Java Program to print or calculate the sum of digits of a given number using a while loop. This program prints…
In this program, we are counting the number of digits present in a given number. For Example Suppose if the given number is say 51 Output should be 2 if…
In this tutorial, you will learn to write Java Program to check that given characters or alphabets are vowels or consonants. We will be using the if else statement of…
Any number when divided by 2 gives a remainder other than zero, which is an odd number. In our java program, we are using while loop to iterate the given…
Any number divisible by 2 is an even number. Here we are using a while loop to iterate the given numbers range. And calculating the sum of all even numbers…
Any number when divided by 2 gives a remainder other than zero which is an odd number. Here we are writing a Java program using a while loop to print…
Any number divisible by 2 is an even number. Here we will see a writing program using a while loop to print all even numbers between 1 and 100. When…
Positive whole numbers are called Natural numbers. In this Java Program, we are trying to print all the natural numbers using a while loop starting from 1 to n. Here…
To Check whether String is Palindrome or not using Java Program, First Let's know about Palindrome. What is Palindrome? A String is called a palindrome, when it is not changed…
In this tutorial, we are going to learn to write Java Program to check whether two given strings are anagrams or not? What is Anagram? Two Strings are called Anagram…
To check whether the person is eligible the vote or not, the Person should complete the age of 18. This means A person age 18 or more is eligible/valid to…
You have given the three sides of the triangle, now you have to identify whether the given triangle is an equilateral or isosceles, or scalene triangle. And We have to…
In this tutorial, you will be learning to write a Java Program to print the total number of days available in the given month and year. Here we are taking…
In this tutorial, You will be learning writing Java Programs to print the weekdays for the given week in numeric form. For Example: Suppose the user has given input 3…
In this tutorial, you are going to learn to write a java program to check whether a given character is in lowercase or uppercase. For Example: Suppose Given character input…
In this tutorial, you will be learning to write Java Program to check whether the given character is a vowel or consonant. There are total 5 vowels in the English…
In this tutorial, you are going to learn to write Java Program to convert a given temperature from Fahrenheit to Celsius. For Example: Suppose the given temperature in Fahrenheit is…
In this tutorial, you will be learning to write Java Program to convert temperature from Celsius to Fahrenheit. For example: Suppose we have a given temperature in Celsius 36 Now…