A ball from 100 meters high free falling bounce height

Source: Internet
Author: User

★ A ball from 100 meters high free fall, each landing after the back to the original height of half, then fall, and then rebound. Seeking the first

10 times when the landing, the total number of meters, the 10th time rebound how high.

#include <stdio.h> #include <stdlib.h>int main () {double h = 100.0,sum = 100.0;int i = 0;for (i = 1; i <=; i               + +) {h = h/2;sum = Sum + H * 2; The distance the ball has traveled contains the bouncing
}printf ("Sum" =%lf\th (Ten) =%lf\n ", sum,h); System (" pause "); return 0;}

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/C3/wKioL1YoqVKi_6iqAACwUKN23sk321.jpg "title=" Run Result " alt= "Wkiol1yoqvki_6iqaacwukn23sk321.jpg"/>

This article is from the "Warm Smile" blog, please be sure to keep this source http://10738469.blog.51cto.com/10728469/1705301

A ball from 100 meters high free falling bounce height

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.