English, asked by susmitach1999, 1 year ago

Task is to calculate the straight line distance between the two objects moving in a circular path. They may move at different velocities. The distance has to be calculated after N seconds.

The figure and commentary below it, explains the problem in detail.

com.tcs.cv.automata.ei.middleware.DocxToHtmlConverter@491cde5b:image1.png

We have two point objects B and C at rest on a straight line at a distance r1 and r2 units from a point A. At time t=0 seconds, the objects start moving in a circular path with A at the center with velocity v1 and v2 degrees per second.

Given inputs v1, v2, r1 and r2, calculate the distance between the B and C after N seconds.

Distance should be printed up to an accuracy of 2 places after the decimal point. Use Rounding Half-up semantics.

Input Format
First line contains velocity of object B in degrees per second (v1)

Second line contains distance of object B from A (r1)

Third line contains velocity of object C in degrees per second (v2)

Fourth line contains distance of object C from A (r2)

Fifth line contains time in seconds after which the distance between B and C, is to be measured (N)

Output
The distance between B and C, N seconds after they are set in motion

Constraints

v1, v2, r1, r2 > 0 and all are integer values.

r2 > r1

0 < n <= 100

The objects move in anticlockwise direction

v1, v2 <=360

r2 <= 100

Answers

Answered by shenoyraghupcmz2r
0
55 hours we will be staying bdhh
Similar questions