小球落地

来源:互联网 发布:淘宝店铺招牌模板 编辑:程序博客网 时间:2024/04/28 08:30
#include<iostream>using namespace std;int main(){float h = 100;float s[10] = { 0 };int i;for (i = 1; i < 9; i++){s[i] = s[i-1] + h;h = h / 2;}for (int i = 0; i < 10; i++)cout << s[i] << endl;system("pause");return 0;}

0 0
原创粉丝点击