Program to calculate area of Circumcircle of an Equilateral Triangle in C++

Sunidhi Bansal
Updated on 20-Sep-2019 13:56:40

150 Views

As the name suggests, equilateral triangle is the one that have equal sides and also it have equal interior angles of 60° each. It is also known as regular triangle because it’s a regular polygonProperties of equilateral triangle are3 sides of equal lengthInterior angles of same degree which is 60Circumcircle of a plygon is the circle that passes through all the vertices of a polygon. The radius of circle can be an edge or side of polygon inside the circle which is known as circumradius and center of circle is known as circumcenter. It can be inside or outside of ... Read More

Program to calculate area and perimeter of equilateral triangle in C++

Sunidhi Bansal
Updated on 20-Sep-2019 13:49:21

267 Views

What is Equilateral Triangle?As the name suggests, equilateral triangle is the one that have equal sides and also it have equal interior angles of 60° each. It is also known as regular triangle because it’s a regularpolygonProperties of equilateral triangle are −3 sides of equal lengthInterior angles of same degree which is 60Given below is the figure of equilateral triangleProblemGiven with the side of equilateral triangle the task is to find the area and perimeter of a triangle where area is the space occupied by the shape and perimeter is the space occupied by its boundaries.To calculate area and perimeter ... Read More

Program to calculate area and perimeter of a rhombus whose diagonals are given\What is rhombus in C++?

Sunidhi Bansal
Updated on 20-Sep-2019 12:46:45

146 Views

What is rhombus?In geometry, rhombus is a quadrilateral with four sides of same length. Rhombus resembles with the shape diamond. If the diagonals of rhombus meet at right angle than it becomes square.Properties of rhombus are −equal sidesOpposite sides are parallel and opposite angles are equal making it parallelogramdiagonals bisects at right angleGiven below is the figure of rhombusProblemGiven with the diagonals, let’s say, d1 and d2 the task is to find the area and perimeter of a rhombus where area is the space occupied by the shape and perimeter is the space that its boundaries will coverTo calculate area ... Read More

Program for Volume and Surface Area of Cuboid in C++

Sunidhi Bansal
Updated on 20-Sep-2019 12:36:32

567 Views

What is cuboid?Cuboid is a three-dimensional object with six faces of rectangle shape which means it has sides of different length and breadth. The difference between a cube and cuboid is that a cube has equal length, height and breadth whereas in cuboids these three are not sameProperties of cuboid are −six faces12 edges8 verticesGiven below is the figure of cubeProblemGiven with the length, width and volume, the task is to find the total surface area and volume of a cuboid where surface area is the space occupied by the faces and volume is the space that a shape can ... Read More

Program for Volume and Surface Area of Cube in C++

Sunidhi Bansal
Updated on 20-Sep-2019 12:08:08

656 Views

What is cube?Cube is a three-dimensional object with six faces of square shape which means it has sides of same length and breadth. Cube is the only regular hexahedron with following properties −six faces12 edges8 verticesGiven below is the figure of cubeProblemGiven with the side, the task is to find the total surface area and volume of a cube where surface area is the space occupied by the faces and volume is the space that a shape can contain.To calculate surface area and volume of a cube there is a formula −Surface Area = 6*Side*sideVolume = Side*side*sideExampleInput-: side=3 Output-: volume ... Read More

Program for Surface Area of Octahedron in C++

Sunidhi Bansal
Updated on 20-Sep-2019 12:02:36

125 Views

What is Octahedron?The word ‘dodecahedron’ is derived from the Greek words where, Octa means ‘Eight’ and hedron specifies ‘faces’. octahedron in geometric is a 3-D platonic or regular solid with eight faces. Like, other figures octahedrons also have properties and that are −6 polyhedron vertices12 polyhedron edges8 equilateral facesGiven below is the figure of octahedronProblemGiven with the sides, the program must find the surface area of octahedron where surface area is the total space occupied by the faces of the given figure.To calculate surface area of octahedron there is a formula −Where, a is side of an OctahedronExampleInput-: side=5 Output-: ... Read More

Program for Surface area of Dodecahedron in C++

Sunidhi Bansal
Updated on 20-Sep-2019 11:58:55

144 Views

What is Dodecahedron?The word ‘dodecahedron’ is derived from the Greek words where, dodeca means ‘twelve’ and hedron specifies ‘faces’. Dodecahedron in geometric is a 3-D platonic or regular solid with twelve flat faces. Like, other figures dodecahedron also have properties and those are −20 polyhedron vertices30 polyhedron edges12 pentagonal faces, as a pentagon is a five-sided polygonGiven below is the figure of dodecahedronProblemGiven with an edge, the program must find the surface area of dodecahedron where surface area is the total space occupied by the faces of the given figure.To calculate surface area of dodecahedron there is a formula −ExampleInput-: ... Read More

Program for factorial of a number in C program

Sunidhi Bansal
Updated on 20-Sep-2019 11:53:49

545 Views

Given with the number n the task is to calculate the factorial of a number. Factorial of a number is calculated by multiplying the number with its smallest or equal integer values.Factorial is calculated as −0! = 1 1! = 1 2! = 2X1 = 2 3! = 3X2X1 = 6 4! = 4X3X2X1= 24 5! = 5X4X3X2X1 = 120 . . . N! = n * (n-1) * (n-2) * . . . . . . . . . .*1ExampleInput 1 -: n=5    Output : 120 Input 2 -: n=6    Output : 720There are multiple methods that ... Read More

Program for EMI Calculator in C program

Sunidhi Bansal
Updated on 20-Sep-2019 11:48:47

570 Views

Given with certain values the program will develop an EMI calculator to generate the needed output. EMI stands for Equated Monthly Installment. So this calculator will generate monthly EMI amount for the user.ExampleInput-: principal = 2000    rate = 5    time = 4 Output-: Monthly EMI is= 46.058037The formula used in the below program is −EMI : (P*R*(1+R)T)/(((1+R)T)-1)where, P indicates loan amount or the Principal amount.R indicates interest rate per monthT indicates loan time period in yearApproach used below is as followsInput principal, rate of interest and time in float variableApply the formula to calculate the EMI amountPrint the ... Read More

StringTokenizer methods in Java

AmitDiwan
Updated on 20-Sep-2019 11:32:32

246 Views

The StringTokenizer class allows an application to break a string into tokens. Following are the methods −Sr.NoMethod & Description1int countTokens()This method calculates the number of times that this tokenizer's nextToken method can be called before it generates an exception.2boolean hasMoreElements()This method returns the same value as the hasMoreTokens method.3boolean hasMoreTokens()This method tests if there are more tokens available from this tokenizer's string.4Object nextElement()This method returns the same value as the nextToken method, except that its declared return value is Object rather than String.5String nextToken()This method returns the next token from this string tokenizer.6String nextToken(String delim)This method returns the next token in this ... Read More

Advertisements