Karthikeya Boyini has Published 2193 Articles

Average of first n even natural numbers?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

1K+ Views

Average or mean of n even natural number is the sum of numbers divided by the numbers.You can calculate this by two methods &minusFind the sum of n even natural numbers and divide it by number, Using loop.Find the sum of n even natural numbers and divide it by number, ... Read More

Implement MySQL ORDER BY without using ASC or DESC?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

156 Views

For this, you can use FIND_IN_SET(). Let us first create a table −mysql> create table DemoTable -> ( -> Number int -> ); Query OK, 0 rows affected (2.25 sec)Insert some records in the table using insert command −mysql> insert into ... Read More

MySQL query to find all rows where string contains less than four characters?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

357 Views

Use CHAR_LENGTH() and find the count of characters in every string and then get the strings which are less than four characters. Let us first create a table −mysql> create table DemoTable -> ( -> Name varchar(100) -> ); Query OK, ... Read More

Sum of the first N Prime numbers

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

3K+ Views

The program to print the sum of the first N prime numbers uses the method to find n prime numbers and then add them to find the sum. This sum is saved to an integer that outputs the sum .The code takes a number checks it for prime, if it ... Read More

1’s and 2’s complement of a Binary Number?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

5K+ Views

Binary Number is expressed in base 2. It uses only two digits ‘0’ and ‘1’. Each digit in a binary number is a bit.Sample binary Number − 01000101111’s ComplementOne's complement of a binary number is obtained by reversing the digits of the binary number i.e. transforming 1 with 0 and ... Read More

Average of odd numbers till a given odd number?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

3K+ Views

The average of odd numbers till a given odd number is a simple concept. You just need to find odd numbers till that number then take their sum and divide by the number.If average of odd number till n is to be found. Then we will find odd numbers from ... Read More

Average of even numbers till a given even number?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

3K+ Views

To find the average of even numbers till a given even number, we will add all the even number till the given number and t count the number of even numbers. Then divide the sum by the number of even numbers.ExampleAverage of even numbers till 10 is 6 i.e.2 + ... Read More

Area of a circle inscribed in a regular hexagon?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

3K+ Views

The circle inscribed in a regular hexagon has 6 points touching the six sides of the regular hexagon.To find the area of inscribed circle we need to find the radius first. For the regular hexagon the radius is found using the formula, a(√3)/2.Now area of the circle inscribed is 3πa*a/4SampleSide ... Read More

Area of a Circular Sector?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

1K+ Views

A circular sector also known as circle sector / sector of a circle is the portion of the circle that is inscribed by between 2 radii. This area is enclosed between two radii and an arc. To find the area inscribed we need to find the angle that is between ... Read More

Area of circle which is inscribed in an equilateral triangle?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:26

10K+ Views

The area of a circle inscribed inside an equilateral triangle is found using the mathematical formula πa2/12.Lets see how this formula is derived, Formula to find the radius of the inscribed circle = area of the triangle / semi-perimeter of triangle.Area of triangle of side a = (√3)a2/4Semi-perimeter of triangle ... Read More

Advertisements