Java Program to Print Multiplication Table of a Number

In this post we will go through the basic java program to print table of a number : Input : Enter number : 5 Output : Multiplication table of 5 5 * 1 = 5 5 * 2 = 10 5 * 3 = 15 5 * 4 = 20 5 * 5 = 25 … Read more

Java Program to Reverse a Number

In this post you will learn basic java program that reverses the digits of a number and print the reversed number. Problem: Here is the example of the problem – Example 1: Input : 5678 Output :8765 Example 2: Solutions: First, we find the remainder of the given number by using the modulo (%) operator. … Read more

Prime Number Program in Java

Here, first we understand that what is prime number, Prime Numbers A prime number is a natural number greater than 1, that is divisible by only two numbers: 1 and itself. For Example: 2, 3, 5, 7,11,13……..are the prime numbers. Note: 0 and 1 are not prime numbers. The 2 is the only even prime … Read more

Addition of two numbers in java

In this post we will go through the process of adding two numbers in Java. Problem : here is the simple example – Input : Enter the first number: 10 Enter the second number: 5 Output : The sum of the two numbers is: 15. Explanation : In this example, the user entered 10 as the … Read more

Java program to check whether the number is even or odd.

In this post we will discuss how to write a program to check whether the number is even or odd in java first, we understand what Even and Odd is: Even and Odd: if a number is evenly divided by 2 (two) without any remainder, then the number is Even. otherwise, the number is odd. … Read more

%d bloggers like this:
Python4U
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.