Sunidhi Bansal has Published 1100 Articles

Product of given N fractions in reduced form in C

Sunidhi Bansal

Sunidhi Bansal

Updated on 13-Aug-2020 08:24:17

136 Views

Given the numerator num and denominator den of N fractions, the task is to find the product N fractions and output should be in reduced form.Like in the given figure below we have two fractions ”4/5” and “3/4” we have found the product of those two factions where the numerator ... Read More

Program to Add Two Complex Numbers in C

Sunidhi Bansal

Sunidhi Bansal

Updated on 13-Aug-2020 08:21:01

8K+ Views

Given are the two complex numbers in the form of a1+ ib1 and a2 + ib2, the task is to add these two complex numbers.Complex numbers are those numbers which can be expressed in the form of “a+ib” where “a” and “b” are the real numbers and i is the ... Read More

Product of middle row and column in an odd square matrix in C

Sunidhi Bansal

Sunidhi Bansal

Updated on 13-Aug-2020 08:18:56

180 Views

Given a square matrix, mat[row][column] where row and column are equal and are of odd length means the number of row and column must me odd, i.e, not divisible by 2, the task is to find the product of middle row and middle column of that matrix.Like in the given ... Read More

Program to compare two fractions in C

Sunidhi Bansal

Sunidhi Bansal

Updated on 13-Aug-2020 08:15:19

551 Views

Given two fractions with some numerator nume1 and nume2 and deno1 and deno2 as their respective denominator, the task is to compare both the fractions and find out the greater one. Like we have a fraction 1/2 and 2/3 and the higher one is 2/3 because the value of 1/2 ... Read More

Program to check if an array is sorted or not (Iterative and Recursive) in C

Sunidhi Bansal

Sunidhi Bansal

Updated on 13-Aug-2020 08:13:30

3K+ Views

Given an array arr[] with n number of elements, our task is to check whether the given array is in sorted order or not, If it is in sorted order then print “The array is in sorted order”, else print “The array is not in sorted order”.To solve the above ... Read More

Program to check if a string contains any special character in C

Sunidhi Bansal

Sunidhi Bansal

Updated on 13-Aug-2020 08:10:20

6K+ Views

Given a string str[], the task is to check whether the string contains any special character and if the string have a special character then print “The String is not accepted” else print “The string is accepted”.Special characters are those characters which are neither numeric nor alphabetic i.e. − !@#$%^&*()+=-\][‘;/., ... Read More

Product of N with its largest odd digit in C

Sunidhi Bansal

Sunidhi Bansal

Updated on 13-Aug-2020 08:07:52

348 Views

Given a number N with we have to product the number with its largest odd digit. If there is no odd digit then print -1.Like we have initialized N with “153” and the largest odd digit in this number is 5 so the result would be the product of 153 ... Read More

Product of maximum in first array and minimum in second in C

Sunidhi Bansal

Sunidhi Bansal

Updated on 13-Aug-2020 08:05:26

207 Views

Given two arrays arr1[] and arr2[] of some size n1 and n2 respectively, we have to find the product of maximum element of first array arr1[] and minimum element of the second array arr2[].Like we have elements in arr1[] = {5, 1, 6, 8, 9} and in arr2[] = {2, ... Read More

Product of factors of number in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 13-Aug-2020 08:02:58

320 Views

Given a number n we have to find its all factors and find the product of those factors and return the result, i.e, the product of factors of a number. Factors of a number are those numbers which can divide the number completely including 1. Like factors of 6 are ... Read More

Product of first N factorials in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 13-Aug-2020 07:59:24

275 Views

Given a number N, the task is to find the product of first N factorials modulo by 1000000007. . Factorial implies when we find the product of all the numbers below that number including that number and is denoted by ! (Exclamation sign), For example − 4! = 4x3x2x1 = ... Read More

Advertisements