Program to check Leap Year

 Program to check whether the input year is leap or not Here we are using Scanner class to get the input from user and then we are using if-else statements to write the logic to check leap year. To understand this program, you should have the knowledge of following concepts of Core Java Tutorial:→ If-else statement→ Read input number in… Continue reading Program to check Leap Year

Program to Multiply Two Numbers

Program to read two integer and print product of them This program asks user to enter two integer numbers and displays the product. To understand how to use scanner to take user input, checkout this program: Program to read integer from system input. Output:

Program to Add two Binary Numbers

Example: Adding binary numbers in Java In this program we are using Scanner to get the input from user (user enters the two binary numbers that we need to add) and then we are adding them bit by bit using while loop and storing the result in an array. Output:

Program to Add two Numbers

Here we will see two programs to add two numbers, In the first program we specify the value of both the numbers in the program itself. The second programs takes both the numbers (entered by user) and prints the sum. First Example: Sum of two numbers Output: Second Example: Sum of two numbers using Scanner… Continue reading Program to Add two Numbers