#include<bits/stdc++.h> using namespace std; int main() { int n=1,i=1,qs; double n1,n2; cout<<"运算次数:"; cin>>qs; n1=1.01; n2=0.99; cout<<" a b"<<endl; cout<<setw(18)<<n1<<' '<<setw(15)<<n2<<endl; while(i<=qs) { cout<<setw(4)<<i<<' '; n1=n1*n1; n2=n2*n2; cout<<setw(15)<<n1<<' '<<setw(15)<<n2<<endl; i++; } return 0; }
by: 发表于:2020-02-04 21:31:36 顶(0) | 踩(0) 回复
版权所有,冒版必究!!!
回复评论