Ask Experts Questions for FREE Help !
Ask
    9944's Avatar
    9944 Posts: 1, Reputation: 1
    New Member
     
    #1

    Oct 30, 2013, 02:08 AM
    C programme
    When we drop a ball on a rigid surface it bounces from the surface up to a height which can be expressed as some percentage of its previous height. This percentage is based on something known as coefficient of restitution. This coefficient is different for different types of balls. For example if the coefficient is 0.9 it means that the ball will go up to 90 percent of its previous height after each bounce.  So if a ball with  coefficient=0.9 is dropped initially from a  height of 10 meters, after 1 bounce the height will be 9 meters, after 2 bounces it will be 8.1 meters and so on.  The total distance the ball has traveled after one bounce is 10 + 9 = 19 meters, after two bounces the total distance is 10 + 9 + 9 + 8.1 = 36.1

     

    Write a program in C that where the user will input an initial height(in metres) and also the coefficient of restitution r (the value of r will be between 0 and 1). Declare an array HEIGHT[101] for storing the height of the ball after each bounce. HEIGHT[0] will contain the original height from which the ball is dropped. HEIGHT[1] to HEIGHT[100] will contain the height after each of the bounces. Your program should display the original height and then followed by the number of each bounce and the height of that bounce. You should stop either when the height of the ball is less than 1 cm (=0.01 meter) or until 100 bounces are completed. Your program should also compute and display the total distance the ball has traveled till the end.

Check out some similar questions!

Late 80's or 90's programme [ 2 Answers ]

Hi all need help trying 2 find a old program it was like power rangers in space but wiv puppet and the space ships turn into a big robot and the last epidsode there master gets killed by a scropion thing can anyone help me I loved this when I was younger and want to watch it again

Name of a kids TV programme [ 2 Answers ]

There was a green friendly monster which I think lived in a greenhouse. It had to ask questions to an owl who lived in a tree. Very vague I know... I think late 80's early 90's. Also another programme was a sort of puppet show and had bogs everywhere? I think was around the same time?


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.