Even and Odd number Program in Java

even odd program in java

In this tutorial we will learn writing the program in Java to check whether a given number is even number or not. Before start writing Lets know What is Even and Odd number? A number is even if it is completely divisible by 2 with 0 remainder. And the number that does not completely divisible … Read more

Factorial Program In Java using loop and recursion

java factorial program

In this tutorial we will learn writing program in java to find the factorial of a number using for loop, while loop, functions and recursions. Before start writing the program Lets first know What is Factorial of a number? Factorial of a whole number ‘n’  is the product of that number with every whole number … Read more

C Program to find highest frequency element in array

C Program To Find Highest Frequency Element In Array

In this tutorial we will learn writing C Program to find highest frequency element in array. Our program will print the array element which have repeated most times. There is one edge case where two elements might repeat same time. This type of case we are not handling in our code. C Program to find … Read more

C program to perform right rotation in array by 2 positions

C Program To Perform Right Rotation In Array By Two Positions

Performing right rotation in array means, our last element will become first element and shift each array elements towards right by one. Here we are going to perform right rotation by 2 times means we will shift each array element toward right two times. Our problem statement Suppose we have an array that has elements a={1,2,3,4,5}. … Read more

C program to perform left rotation of array elements by two positions

C Program To Perform Left Rotation Of Array Elements By Two Positions

Performing left rotation in array means, our first element will become last element and shift each array elements towards left by one. Here we are going to perform left rotation by 2 times means we will shift each array element toward left two times. Our problem statement Suppose we have an array that has elements a={1,2,3,4,5}. … Read more