Sunidhi Bansal has Published 1078 Articles

C Program for Armstrong Numbers

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 12:00:35

667 Views

We are given a task where we have to check a number n entered by the user, whether it’s Armstrong or not.An Armstrong number is when the sum of all the digits power by the number of digits or we can say order of digits n, is same as the ... Read More

Program for Area Of Square in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 11:53:37

2K+ Views

We are given with a side of a rectangle and our task is to print the area of the square from that side.Square is 2-D plain figure which have 4 sides and forms 4 angles of 90degree each and all the sides are of equal shape. In other words we ... Read More

C++ Program for Area Of Square after N-th fold

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 11:50:02

209 Views

Given a side of a square and the number of fold, we have to find the Area of square after number of folds.A square is a 2-D shape like rectangle where all the sides are equal. And it’s all angles are equal to 90 degrees.While folding a square we −Fold ... Read More

C Program for Area And Perimeter Of Rectangle

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 11:47:18

3K+ Views

Given a length and breadth of a rectangle we have to find its area and Perimeter.Rectangle is 2-D figure containing four sides and four angles of 90 degree each. All the sides of rectangle are not equal only the opposite sides of a rectangle are equal. The diagonals in a ... Read More

C Program for n-th odd number

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 11:46:16

1K+ Views

Given a number N we have to find the N-th odd number.Odd numbers are the numbers which are not completely divided by 2 and their remainder is not zero. Like 1, 3, 5, 7, 9, ….If we closely observe the list of even numbers we can also represent them as(2*1)-1=1, ... Read More

C Program for n-th even number

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 11:39:33

693 Views

Given a number N we have to find the N-th even number.Even numbers are the numbers which are completely divided by 2 and their remainder is zero. Like 2, 4, 6, 8, 10, ….If we closely observe the list of even numbers we can also represent them as2*1=2, 2*2=4, 2*3=6, ... Read More

Program to check if N is a Pentagonal Number in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 11:37:11

594 Views

Given with a number N the task is to check whether the number is a pentagonal number or not. Numbers that can be arranged to form a pentagon is a pentagonal number as these numbers can be used as points to form a pentagon. For example, some of pentagonal numbers ... Read More

C++ Program to Convert Km/hr to miles/hr and vice versa

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 11:12:51

651 Views

If input is in km/hr convert it to miles/hr else input will be in miles/hr convert it to km/hr. There are formulas that can be used for this conversion.Conversion Formulas −1 kilo-metre = 0.621371 miles 1 miles = 1.60934 Kilo-meterExampleInput-: kmph= 50.00    Mph = 10.00 Output-: speed in m/ph ... Read More

Program to convert speed in km/hr to m/sec and vice versa in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 11:00:19

811 Views

Conversion Formulas −1 km/hr = 5/18 m/sec or 0.277778 m/sec 1 m/sec = 18/5 km/hr or 3.6 km/hrExampleInput-: km = 60.00    mk = 70.00 Output-: speed in meter per second = 16.6667    speed in km per hour = 252AlgorithmStart Step 1 -> Declare function to convert km/hr into ... Read More

Program to Convert Radian to Degree in C

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 10:58:09

2K+ Views

If input is in radian convert it to degree else input will be in radian convert it to degree. There are formulas that can be used for this conversion.Radian is the standard unit for measuring angles whereas the complete angle of circle is divided into 360 degree. Also, radian is ... Read More

Advertisements