Posts

Showing posts with the label Mathematics

Maths and Java

Question: A sum of 3000 INR is to be given  in the form of 63 prizes. If the prize money  is either 100 INR or 25 INR. Find the number of prizes of each type. Maths:  Let the count of prizes in sum of rupees 100 each be X              Then the value of prize be 100X           Let the count of prizes in sum of rupees 25 each be Y             Then the value of prize be 25Y         Total number of prizes is X+Y=63     ----------->1                     X=63-Y            Now the Total prize value  is 3000.          Then 100X+25Y=3000                --------->2            100(63-Y)+25Y=3000                  ...

Multiply Negative numbers in java

For this challenge, you will be given an array and you are asked to count how many numbers are negative and multiply them and print the output to the STDOUT.  Input Format  -  you will be taking a number as an input from STDIN which tells about the length of the array. On another line, array elements should be there with single space between them.  Output Format  -  print the multiplication to the STDOUT.  Sample Test Case:   Sample Input: - 7 -8 -7 6 0 7 -1 6 Sample Output  -  -56  Explanation:   There are three negative numbers present in the array and their multiplication comes out to be -56.

TRIGONOMETRY-(RATIOS,IDENTITIES AND HEIGHTS AND DISTANCES)

Image
TRIGONOMETRY (RATIOS, IDENTITIES AND HEIGHTS AND DISTANCES) Trigonometry deals with the study of triangles, the measurement of their sides, angles and the various relations which exist between them. Angle: An angle, in trigonometry, is formed by the rotation of a ray in a plane around the end point. In the above figure, OA is the initial position and OB is the final position of the ray. Positive and Negative Angles:  If the rotation of the ray OA about 'O' is in the anticlockwise direction, then the angle AOB is positive and if the ray rotates in the clockwise direction, the angle made is considered as negative. Quadrants:  The concept of quadrants was discussed in the chapter Co-ordinate Geometry in detail. We now summarize this concept diagrammatically. Systems of Measurement of Angles:  Initially, we understand the division of a right angle. 1 right angle=90^o (ninety degrees) 1^o =60' (Sixty minutes) 1'=60" (Sixty seconds) ...