Sunidhi Bansal has Published 1100 Articles

C Program to add two fractions

Sunidhi Bansal

Sunidhi Bansal

Updated on 18-Oct-2019 12:26:44

3K+ Views

Given with the input as fraction i.e. a/b and c/d where a, b, c and d can be any integer values other than 0 and the task is to add these two fraction to generate their final sum.Fractions are represented by −a / b, where a is known as numerator ... Read More

C++ Program for sum of arithmetic series

Sunidhi Bansal

Sunidhi Bansal

Updated on 18-Oct-2019 12:18:02

3K+ Views

Given with ‘a’(first term), ‘d’(common difference) and ‘n’ (number of values in a string) and the task is to generate the series and thereby calculating their sum.What is an Arithmetic seriesArithmetic series is the sequence of numbers with common difference where the first term of a series is fixed which ... Read More

C++ Program to check if tank will overflow, underflow or filled in given time

Sunidhi Bansal

Sunidhi Bansal

Updated on 18-Oct-2019 12:07:06

193 Views

Given with the rate of filling the tank, height of a tank and radius of a tank and the task is to check whether the tank is overflow, underflow and filled in given time.ExampleInput-: radius = 2, height = 5, rate = 10 Output-: tank overflow Input-: radius = 5, ... Read More

C++ program to check if first and the last characters of string are equal

Sunidhi Bansal

Sunidhi Bansal

Updated on 18-Oct-2019 11:27:44

889 Views

Given with an input of string and the task is to check whether the first and last characters of given string is equal or not.ExampleInput-: study Output-: not equal    As the starting character is ‘s’ and the end character of a string is ‘y’ Input-: nitin Output-: yes it ... Read More

C++ program to Calculate the Edge Cover of a Graph

Sunidhi Bansal

Sunidhi Bansal

Updated on 18-Oct-2019 11:22:39

145 Views

Given a n number of vertices of a graph, the task is to calculate the edge cover of the graph. Edge cover is to find the minimum number of edges required to cover every vertex of the graph.Like we have n = 5Then its graph will be like −So its ... Read More

C++ program to calculate Profit Or Loss

Sunidhi Bansal

Sunidhi Bansal

Updated on 18-Oct-2019 11:18:06

3K+ Views

Given with the cost price(CP) and the selling price(SP) and the task is to calculate the profit gained or loss incurred.Cost price or CP is the price at which the product is purchased by the seller and the selling price or SP is the price at which the product is ... Read More

C++ program to calculate GST from original and net prices

Sunidhi Bansal

Sunidhi Bansal

Updated on 18-Oct-2019 11:13:59

1K+ Views

Given with the original cost and net price as an input and the task is to calculate the GST percentage and display the resultGST stands for Goods and Service task. It is always included in the Net price of the product and before calculating the GST percentage we need to ... Read More

C program to calculate distance between two points

Sunidhi Bansal

Sunidhi Bansal

Updated on 18-Oct-2019 11:10:35

3K+ Views

Given with the two points coordinates and the task is to find the distance between two points and display the result.In a two dimension plane there are two points let’s say A and B with the respective coordinates as (x1, y1) and (x2, y2) and to calculate the distance between ... Read More

C program to calculate distance between three points in 3D

Sunidhi Bansal

Sunidhi Bansal

Updated on 18-Oct-2019 11:02:39

800 Views

Given with the 3-D plane and hence three coordinates and the task is to find the distance between the given points and display the result.In a three dimension plane there are three axis that are x-axis with its coordinates as (x1, y1, z1), y-axis with its coordinates as (x2, y2, ... Read More

C program to calculate age

Sunidhi Bansal

Sunidhi Bansal

Updated on 18-Oct-2019 10:57:19

22K+ Views

Given with the current date and the birth date of a person and the task is to calculate his current age.ExampleInput-: present date-: 21/9/2019    Birth date-: 25/9/1996 Output-: Present Age    Years: 22 Months:11 Days: 26Approach used below is as follows −Input the current date and birth date of ... Read More

Advertisements