第五周作業

2021-06-21 11:46:10 字數 2077 閱讀 6637

5求自然對數

#include

using namespace std; 

int main() 

cout << "e = "<

6求圓周率

#include

#include

using namespace std; 

int main() 

cout << "pi約等於:"<

7

#include

using namespace std; 

int main() 

for(;k<13;k++) 

cout << " "; 

cout << endl; 

}  for (i=2;i>=0;i--) 

for(;k<13;k++) 

cout << " "; 

cout << endl; 

}  return 0; 

}

9

#include

using namespace std; 

int main() 

n=n-1; 

cout<< "最大的n值是:"<

10#include

#include

using namespace std; 

int main() 

cout <

百錢百雞

#include

using namespace std; 

int main() 

cout << "該數由"<

第四題

#include

using namespace std; 

int main() 

cout <<"s=1!+2!+3!……+n!="<

第六題

#include

using namespace std; 

int main() 

cout << "第一天時猴子摘了"《第七題

#include

using namespace std; 

int main() 

s+=fac; 

fac=0; 

}  cout<< "s[n]=a+aa+aaa+aa...a="<

第八題

#include

using namespace std; 

int main() 

{  int fac_1,fac_2,pro;//因子一和因子二,以及乘積。  

for(fac_2=1;fac_2<=9;fac_2++) 

{  for(fac_1=1;fac_1<=fac_2;fac_1++) 

{  pro=(fac_1*fac_2); 

cout <

第九題

#include

using namespace std; 

int main() 

{  char z_three,l_four,w_five; 

for(z_three='a';z_three<='c';z_three++) 

for(l_four='a';l_four<='c';l_four++) 

for(w_five='a';w_five<='c';w_five++) 

{  if(z_three!=l_four&&z_three!=w_five&&l_four!=w_five) 

if(z_three!='a'&&w_five!='a'&&w_five!='c') 

{  cout << "張三--"<

第五周作業

includeusing namespace std class student 用引數的初始化表對資料成員初始化。void max student arr void display private int num int score void student display void studen...

第五周作業

注意 總時間限制 1000ms 記憶體限制 65536kb 描述寫乙個mystring 類,使得下面程式的輸出結果是 1.abcd efgh abcd 2.abcd 3.4.abcd efgh 5.efgh 6.c 7.abcd 8.ijal 9.ijal mnop 10.qrst abcd 11....

第五周作業

1 由使用者輸入銀行的英文簡稱,使用if else if 語句判斷並輸出銀行的中文全稱。要點 分別使用if else if 語句和switch語句 using system using system.collections.generic using system.linq using system...