A number is said to be prime if it is divisible by 1 and itself. otherwise it is composite. Algorithm Step 1: START. Step 2: read the number n. Step 3: Check the divisibility of the number from 2 to n/2. Step 4: If number is divisible by any of… Continue Reading Java program to check whether the given number is prime or not

In this Program the user is asked to enter two numbers. Based on the numbers the division of two numbers is per Algorithm: Step 1: Start. Step 2: Declare variables, say a, b and c. Step 3: c = a/b; Step 4: Display result. Step 5: Stop. Source code:

Continue Reading Java program for Division of two numbers

In this program user is asked to enter two integers and the sum operation is performed. Source code:

Output: C:\Users\Desktop\new>javac  Add.javaC:\Users\Desktop\new>java Add *** www.programmingposts.com *** << Addition of two numbers without using Third Variable >> Enter first number to be added: 9 Enter Second number to be added: 6… Continue Reading Java Program to add two numbers without using third variable