October 14, 2010

fuck bull shit 答案啦 幹死老書 考這麼激掰 肏

求e值
#include <iostream>
using namespace std;
double f(double n)
{double k;double a,c;int d,m,f;
c=n-1;m=n;
d=0;
a=0;
n=0;
f=c;
while(a<m)
{k=1;
 while(c>0)
 {k=k/c;
 c=c-1;}
 f=f-1;
 c=f;
 a=a+1;
    n=n+k;

}
return n;
}
int main()
{int j=1,k=0;
while(j<101)
{cout<<f(j)<<" ";
j++;
k++;
if(k%5==0)
{cout<<endl;}

}

 system("pause");
 return 0;
}


三角塔 (      3   )
   3  2  3
   3  2  1  2  3

#include<iostream>
#include<iomanip>
using namespace std;

int main()
{
 int a;
 cout<<"Enter the number of lines: ";
 cin>>a;

 for(int i=1;i<=a;i++)
 {
  for(int j=1;j<=a;j++)
  {
   if(j<=a-i)
cout<<"   ";
   else
   {
for(int k=1;k<=2*i-1;k++)
{
 if(k<i)
 {
  cout<<setw(3)<<a;
  a--;
 }
 else
 {
  cout<<setw(3)<<a;
  a++;
 }
}
a--;
break;
   }

  }
  cout<<endl;
 }
 return 0;
}



 

0推薦此文章
Today's Visitors: 0 Total Visitors: 7
Personal Category: Uncategorized Articles Topic: learning / academic / mathematics
[Trackback URL]

Post A Comment









Yes No



Please input the magic number:

( Prevent the annoy garbage messages )
( What if you cannot see the numbers? )
Please input the magic number

誰來收藏
Loading ...
unlog_NVPO 0