## Find the Nth digit in the proper fraction of two numbers

Given three integers P, Q and N where P < Q, the task is to compute the fraction value of P / Q and find… Read More »

## Print first N terms of series (0.25, 0.5, 0.75, …) in fraction representation

Given an integer N, the task is to print the first N terms of the series in their fraction form i.e. 1/4, 1/2, 3/4, 1,… Read More »

## Fraction

A fraction is a ratio of two values. Fractions have the form a/b where a is called the numerator, b is called the denominator and… Read More »

## LCM and HCF of fractions

Given n fractions as two arrays Num and Den. The task is to find out the L.C.M of the fractions. Examples: Input: num[] = {1,… Read More »

## Represent the fraction of two numbers in the string format

Given two integers representing the Numerator and Denominator of a fraction, return the fraction in string format. If the fractional part is repeating, enclose the… Read More »

## Product of given N fractions in reduced form

Given the Numerator and Denominator of N fractions. The task is to find the product of N fraction and output the answer in reduced form.… Read More »

## Extended Midy’s theorem

According to Midy’s theorem, if the period of a repeating decimal for , where p is prime and is a reduced fraction, has an even… Read More »

## N-th term of George Cantor set of rational numbers

George cantor named mathematician gave a proof that set of rational numbers is enumerable. We don’t have to proof it over here rather we have… Read More »

## Find ΔX which is added to numerator and denominator both of fraction (a/b) to convert it to another fraction (c/d)

Given a fraction in form of a/b where a & b are positive integers. Find ΔX such that when it is added to numerator as… Read More »

## Maximum rational number (or fraction) from an array

Given rational numbers, the task is to find the maximum rational number. Examples: Input : ra_num = {{1, 2}, {2, 3}, {3, 4}, {4, 5}};… Read More »

## Program to compare two fractions

Given two fractions a/b and c/d, compare them and print the larger of the two. Examples : Input: 5/6, 11/45 Output: 5/6 Input: 4/5 and… Read More »

## Program for Spearman’s Rank Correlation

Prerequisite : Correlation Coefficinet Given two arrays X[] and Y[]. Find Spearman’s Rank Correlation. In Spearman rank correlation instead of working with the data values… Read More »

## First occurrence of a digit in a given fraction

Given three integers a, b and c, find the first occurrence of c in a/b after the decimal point. If it does not exists, print… Read More »

## as_integer_ratio() in Python for reduced fraction of a given rational

Given a rational number d, print the reduced fraction which gives d. Examples: Input : d = 2.5 Output : 5/2 Explanation: 5/2 gives 2.5… Read More »

## Find x, y, z that satisfy 2/n = 1/x + 1/y + 1/z

Given n, find x, y, z such that x, y, z satisfy the equation “2/n = 1/x + 1/y + 1/z” There are multiple x,… Read More »