Sunidhi Bansal has Published 1100 Articles

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

825 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

470 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

438 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

450 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

C++ Program to Convert Hexadecimal Number to Binary

Sunidhi Bansal

Sunidhi Bansal

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

1K+ Views

Given with hexadecimal number as an input, the task is to convert that hexadecimal number into a binary number.Hexadecimal number in computers is represented with base 16 and binary number is represented with base 2 as it has only two binary digits 0 and 1 whereas hexadecimal number have digits ... 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

563 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

Program to check if two given matrices are identical in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 10:55:03

795 Views

Given two matrix M1[r][c] and M2[r][c] with ‘r’ number of rows and ‘c’ number of columns, we have to check that the both given matrices are identical or not. If they are identical then print “Matrices are identical” else print “Matrices are not identical”Identical MatrixTwo matrices M1 and M2 are ... Read More

Program to check if a matrix is symmetric in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 23-Sep-2019 10:40:30

508 Views

In linear algebra a matrix M[][] is said to be a symmetric matrix if and only if transpose of the matrix is equal to the matrix itself. A transpose of a matrix is when we flip the matrix over its diagonal, which resultant switches its row and columns indices of ... Read More

Advertisements