Computer Science, asked by saradhvisrinivasan, 4 months ago

Section
MCQ Programming i
A marathon is a long-distance race with an official distance of
42.195 kilometres (26 miles 385 yards), usually run as a road race
or footrace.
A local marathon was organized at Bavdhan, Pune. The distance
actually covered by the participants has been recorded in an array
R[] which is an integer array holding the values in kilometres. If
there are N number of participants who started running at a
particular time, then the size of R is N. The participants should
cover a distance more than 0.0 km to get recorded in array R[].
Find the maximum distances covered by 3 highest racers
excluding finishers. If there are only one or two racers excluding
finishers, give their distances covered.
R[] will be Input float array. Write a code to take Input array R[],
and return 3 maximum distances excluding Finishing Distance d, d
= 42.195 km.
Example 1:
Input Values
Enter the distances covered by athlets in Marathon (Kilometers)
please
(press q to terminate):
42.195



how to write program for the above question​

Answers

Answered by hasinabegamsiddika
8

Answer:

You do in google please

Explanation:

please follow me

Answered by jyotirmaysharma9977
24

Explanation:

this is the java program asked in TCS IRC,I have solved it

a little mistake in 24th line make the decrement m--,and after 29 increment k as k++,and in line 25 compare R(m) with 42.195f as java provides double as default,so we type casted 42.195 to float value rest is alright

Attachments:
Similar questions