标签:
1 #include <iostream> 2 using namespace std; 3 int main() 4 {int a=2,n,i=1,sn=0,tn=0; 5 cin>>n; 6 while (i<=n) 7 {tn=tn+a; 8 sn=sn+tn; 9 tn=tn*10; 10 ++i; 11 } 12 cout<<sn<<endl; 13 return 0; 14 }
标签:
原文地址:http://www.cnblogs.com/wangmengmeng/p/4542553.html