




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
1、1、叉樹的先序遍歷序列和后序遍歷序列正好相反,則該二叉樹滿足的條件是(D)A、空或只有一個結(jié)點 B、高度等于其結(jié)點數(shù) C、該二叉樹是完全二叉樹 D、所有結(jié)點無右孩子應(yīng)該是二叉樹的每個結(jié)點都只有一個(左或右)子樹時,先序和和后序正好相反2、假設(shè)X是這樣的自然數(shù),X能被4整除或者X的個位數(shù)是3,那么在3000以內(nèi)(小于1000),求這樣的X的累加之和。(1575900)cpp view plaincopyprint?1. #include "stdafx.h" 2. 3. #include
2、4. 5. #include 6. 7. #include 8. 9. #include "math.h" 10. 11. #include 12. 13. #include 14. 15. 16. 17. using namespace
3、0;std; 18. 19. 20. 21. 22. 23. int main(int argc, _TCHAR*argv) 24. 25. 26. 27. int i,sum=0; 28. 29.
4、60; 30. 31. for(i=0; i<=3000;i+) 32. 33. 34. 35. if(i%4=0 | i=3) 36. 37.
5、160; 38. 39. sum = sum+i; 40. 41. 42. 43. 44. 45.
6、160; printf("%dn", sum); 46. 47. return 0; 48. 49. 3、某公司數(shù)據(jù)庫密碼規(guī)定為5位組成的字符串,存儲之前,需要將其加密,加密算法為:依次將每個字符依次將每個字符的ASC碼值乘以2,再加上10,若計算到的新字符的值等于128,則繼續(xù)將其除以3,否則不進行除法運算。最后將該得到的新字符串中所有字符前后互換(第一位和最后一位,第
7、二位和倒數(shù)第二位交換,依次交換),編程求字符串“efvrg”加密后的字符串。(HORGF)cpp view plaincopyprint?1. #include "stdafx.h" 2. 3. #include 4. 5. #include 6. 7. #include 8. 9. #include "math.h" 1
8、0. 11. #include 12. 13. #include 14. 15. using namespace std; 16. 17. int main(int argc, _TCHAR*argv) 18. 19. 20. 21. char p
9、wd= "efvrg",temp; 22. 23. int len =strlen(pwd); 24. 25. 26. 27. for(inti=0;i 28. 29. 30. 31.
10、; printf("%cn",pwdi); 32. 33. if(pwdi*2+10)>=128) 34. 35. 36. 37.
11、160;pwdi=(pwdi*2+10)/3; 38. 39. printf("新字符的值等于128%cn",pwdi); 40. 41. 42. 43. else
12、 44. 45. 46. 47. pwdi=(pwdi*2+10); 48. 49. printf("小于128%cn",pwdi);
13、60; 50. 51. 52. 53. 54. 55. 56. 57. for(intj=0;j 58. 59. 60. 61.
14、60; temp=pwdj; 62. 63. pwdj=pwdlen-j-1; 64. 65. pwdlen-j-1=temp; 66. 67. 68. 69. 70.
15、60; 71. for(intj=0;j 72. 73. 74. 75. printf("加密后的字符串%cn",pwdj); 76. 77. 78. 79. 80.
16、;81. return0; 82. 83. 5、為了有效的捕獲系統(tǒng)需求,應(yīng)采用(C)A、瀑布模型 B、V 模型 C、原型模型 D、螺旋模型 12、2到38642之間個位數(shù)為1的素數(shù)(只能被自己和1整除的數(shù))的和是(18343110)cpp view plaincopyprint?1. #include "stdafx.h" 2. 3. #include 4. &
17、#160;5. #include 6. 7. #include 8. 9. #include "math.h" 10. 11. #include 12. 13. #include 14. 15. 16. 17. using namespace std;
18、0; 18. 19. 20. 21. 22. 23. int main(int argc, _TCHAR*argv) 24. 25. 26. 27. int i=0,sum=0; 28. 29.
19、; 30. 31. for(i=2; i<=38642; i+) 32. 33. 34. 35. int a,b,m = i/2;
20、; 36. 37. 38. 39. a=i; 40. 41. &
21、#160; 42. 43. while (i%m!=0 && m>1) 44. 45. 46.
22、47. m-; 48. 49. 50. 51. &
23、#160; 52. 53. if (a=1 && m=1) 54. 55. 56.
24、60; 57. sum += i; 58. 59. 60. 61.
25、 62. 63. printf("%dn",sum); 64. 65. 66. 67. return 0; 68. 69. 70. 71. 13、有關(guān)類和對象的說法中不正確的一項是
26、(C) 72. 73. A、對象是類的一個實例 B、任何一個對象只能是屬于一個具體的類 C、一個類只能有一個對象 D、類與對象的關(guān)系與數(shù)據(jù)模型和變量的關(guān)系類似 74. 75. 76. 77. 26、寫出下列程序運行的結(jié)果(BAAAABCAAABCDAABCD) 78. 79. #include 80. 81. &
27、#160;#include 82. 83. intmain() 84. 85. charstr1100="BCD" 86. 87. char str2100="AAAAA" 88. 89.
28、0; int i=0; 90. 91. for(i=1;i<=4;i+) 92. 93. memcpy(str2,str1,i); 94. 95. printf
29、("%s",str2); 96. 97. 98. 99. return 0; 100. 101. 15、輸出712的N次方,結(jié)果后三位為696的N的個數(shù),0(246)cpp view plaincopyprint?1. #include "stdafx.h"
30、 2. 3. #include 4. 5. #include 6. 7. #include 8. 9. #include "math.h" 10. 11. #include 12. 13. #include 14. 15.
31、 16. 17. using namespace std; 18. 19. 20. 21. int main(int argc, _TCHAR* argv) 22. 23. 24. 25. intsum=712,count=0; 26.
32、 27. 28. 29. for(inti=0;i<24669;i+) 30. 31. 32. 33. sum=sum*71200; 34. 35.
33、160; if(sum=696) 36. 37. count+; 38. 39. 40. 41. printf("輸出712的N次方,結(jié)果后三位為696的N的個數(shù)為:%d (0)"
34、,count); 42. 43. scanf("%d",&count); 44. 45. 46. 47. return0; 48. 49. 16、輸出下面的第三行的結(jié)果(7)public class Hello
35、0; public static void main(String args) String overview = "This chapter contains a description ofconvertions used in this manual" &
36、#160; for (int i = 0; i < overview.length();i+) int num = 0;
37、; for (int j = 0; j < overview.length();j+)
38、60; if (overview.charAt(i) = overview.charAt(j)
39、160; num+; System.out.println(num);
40、60; 17、不屬于構(gòu)造函數(shù)特征的是(D)A、構(gòu)造函數(shù)的函數(shù)名與類名同名 B、構(gòu)造函數(shù)可以重載 C、構(gòu)造函數(shù)可以設(shè)置缺?。J(rèn))參數(shù) D、構(gòu)造函數(shù)必須指定類型說明 18到5635468724之間的最大素數(shù)是?1340501419cpp view plaincopyprint?1. #include "stdafx.h" 2.
41、; 3. #include 4. 5. #include 6. 7. #include 8. 9. #include "math.h" 10. 11. #include 12. 13. #include 14. 15. 16. 17. using namespace std; 18. 19. 20. 21. 22. 23. int main(int argc, _TCHAR*argv)&
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年廣東生態(tài)工程職業(yè)學(xué)院高職單招職業(yè)適應(yīng)性測試歷年(2019-2024年)真題考點試卷含答案解析
- 2025年廣東嶺南職業(yè)技術(shù)學(xué)院高職單招高職單招英語2016-2024歷年頻考點試題含答案解析
- 2025年山西工程職業(yè)學(xué)院高職單招職業(yè)適應(yīng)性測試歷年(2019-2024年)真題考點試卷含答案解析
- 2025年山西華澳商貿(mào)職業(yè)學(xué)院高職單招(數(shù)學(xué))歷年真題考點含答案解析
- 2025年山東藥品食品職業(yè)學(xué)院高職單招職業(yè)技能測試近5年??及鎱⒖碱}庫含答案解析
- 2025年安徽現(xiàn)代信息工程職業(yè)學(xué)院高職單招職業(yè)技能測試近5年??及鎱⒖碱}庫含答案解析
- 腸造口的護理常規(guī)
- icl相關(guān)知識課件試題
- 9001標(biāo)準(zhǔn)培訓(xùn)課件
- 房地產(chǎn)代持代理合同范本
- 機械制圖綜合練習(xí)題
- 2019年自考《世界市場行情》模擬試題及答案
- 《中華人民共和國軍人地位和權(quán)益保障法》重點內(nèi)容學(xué)習(xí)PPT課件(帶內(nèi)容)
- JJF 1214-2008長度基線場校準(zhǔn)規(guī)范
- GB/T 5162-2021金屬粉末振實密度的測定
- GB/T 12755-2008建筑用壓型鋼板
- 地測防治水各崗位工種標(biāo)準(zhǔn)化操作規(guī)范
- 《千字文》教學(xué)講解課件
- 代詞-專升本英語語法課件
- 高效時間管理技能-GTD課件
- 《調(diào)整心態(tài),積極迎考》主題心理班會
評論
0/150
提交評論