## Program to Convert Radian to Degree

Before moving to the actual solution, let’s try to find out what is a degree, a radian, and their relations. Radian : The radian is… Read More »

## Program to Convert Km/hr to miles/hr and vice versa

Given a speed in km/hr, Convert it to m/hr and m/hr to km/hr. Examples: Input : 150 (km/hr) Output : 93.21 Input : 100 (m/hr)… Read More »

## Java Program for Number of stopping station problem

There are 12 intermediate stations between two places A and B. Find the number of ways in which a train can be made to stop… Read More »

## Java Program for Print Number series without using any loop

Problem – Givens Two number N and K, our task is to subtract a number K from N until number(N) is greater than zero, once… Read More »

## Java Program for compound interest

Compound Interest formula: Formula to calculate compound interest annually is given by: Compound Interest = P(1 + R/100)r Where, P is principle amount R is… Read More »

## Java Program for cube sum of first n natural numbers

Print the sum of series 13 + 23 + 33 + 43 + …….+ n3 till n-th term. Examples: Input : n = 5 Output… Read More »

## Java Program for Smallest K digit number divisible by X

Integers X and K are given. The task is to find the smallest K-digit number divisible by X. Examples: Input : X = 83, K… Read More »

## Java Program for Largest K digit number divisible by X

Integers X and K are given. The task is to find highest K-digit number divisible by X. Examples: Input : X = 30, K =… Read More »

## Java Program to find the sum of a Series 1/1! + 2/2! + 3/3! + 4/4! +…….+ n/n!

You have been given a series 1/1! + 2/2! + 3/3! + 4/4! +…….+ n/n!, find out the sum of the series till nth term.… Read More »

## Java Program to Print Matrix in Z form

Given a square matrix of order n*n, we need to print elements of the matrix in Z form Examples: Input : mat[][] = {1, 2,… Read More »

## Java Program to Split the array and add the first part to the end

There is a given an array and split it from a specified position, and move the first part of array add to the end. Examples:… Read More »

## Java Program for Range sum queries without updates

Given an array arr of integers of size n. We need to compute sum of elements from index i to index j. The queries consisting… Read More »

## Java Program for simple interest

Simple interest formula is given by: Simple Interest = (P x T x R)/100 Where, P is the principle amount T is the time and… Read More »

## Java Program for Difference between sums of odd and even digits

Given a long integer, we need to find if the difference between sum of odd digits and sum of even digits is 0 or not.… Read More »

## Java Program to Find minimum sum of factors of number

Given a number, find minimum sum of its factors. Examples: Input : 12 Output : 7 Explanation: Following are different ways to factorize 12 and… Read More »