国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

CSCI1540代寫、代做C++設計編程
CSCI1540代寫、代做C++設計編程

時間:2024-10-16  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



CSCI1540 Fundamental Computing with C++, Fall 2024/25 
Department of Computer Science and Engineering, The Chinese University of Hong Kong 
Copyright © 2024 CSE, CUHK Page 1 of 2 
Due: 23:59, Thu 17 Oct 2024 File name: kaprekar.cpp Full marks: 100 
Introduction 
The objective of this assignment is to master the use of selective and nested repetitive control flow. 
You will write nested loops to look for Kaprekar numbers. 
A Kaprekar number is a positive integer    if the digits of the square   
2
 can be split into two parts 
that add up to   , where the part formed from the low-order (rightmost) digits of   
2
 must be nonzero
 (although leading zeroes are allowed in the part). For example, 45 is a Kaprekar number, 
because 45
2 = 2025 can be split into two parts 20 and 25, with 20 + 25 = 45. As another example, 
999 is also a Kaprekar number, because 999
2 = 998001 and 998 + 001 = 999. (Note the loworder
 part 001 includes leading zeroes.) However, 31 is not a Kaprekar number, because all three 
possible splits of 31
2 = 961 are no good (96 + 1 ≠ 31, 9 + 61 ≠ 31, and 0 + 961 ≠ 31). 
Program Specification 
The program shall ask for two user inputs    and   . They are assumed to be always integers. You are 
required to use the data type long long instead of int for all integer variables in this assignment, 
because a square can easily go overflow with (that is, larger than the upper bound of) the int type. 
1. The program first prompts the user to enter an integer   . When    is not positive, you shall 
display a warning message and ask for another input, until    is positive. Your program shall look 
for Kaprekar number(s) greater than or equal to   . 
2. Then prompt the user to enter how many Kaprekar numbers the user is looking for. When this 
input    is not positive, display a warning message and ask for another input, until    is positive. 
3. After validating inputs    and   , repeatedly test   ,    + 1,    + 2,    + 3, … to check whether it is a 
Kaprekar number. If so, print out the square and the split of the two parts. (See the upcoming 
Sample Runs section for the printing format.) Repeat these checks until    Kaprekar numbers are 
found and printed. Then program execution ends. 
➢ To check whether a number    is a Kaprekar number, you progressively check all possible 
splits of   
2
. E.g., let    = 345 and hence   
2 = 11**25. The first split to check is 11**2 and 
5; the next split is 11** and 25; the next split is 119 and 025; and so on. 
Note: In this assignment, you are not allowed to: (1) use any functions in the <cmath> library, (2) 
write any functions other than main(), and (3) use any arrays/vectors (which are not yet taught). 
Sample Runs 
In the following sample runs, the blue text is user input and the other text is the program printout. 
You can try the provided sample program for other input. Your program output should be exactly the 
same as the sample program (same text, symbols, letter case, spacings, etc.). Note that there is a 
space after the ‘:’ and ‘?’ in the program printout. CSCI1540 Fundamental Computing with C++, Fall 2024/25 
Department of Computer Science and Engineering, The Chinese University of Hong Kong 
Copyright © 2024 CSE, CUHK Page 2 of 2 
Enter an integer: 40↵ 
How many Kaprekar numbers? 3↵ 
45^2 = 2025 
20 + 25 = 45 
55^2 = 3025 
30 + 25 = 55 
99^2 = 9801 
98 + 1 = 99 
 
Enter an integer: -23↵ 
Input must be +ve! Enter again. 
Enter an integer: -1↵ 
Input must be +ve! Enter again. 
Enter an integer: 0↵ 
Input must be +ve! Enter again. 
Enter an integer: 200↵ 
How many Kaprekar numbers? 0↵ 
Input must be +ve! Enter again. 
How many Kaprekar numbers? 0↵ 
Input must be +ve! Enter again. 
How many Kaprekar numbers? -777↵ 
Input must be +ve! Enter again. 
How many Kaprekar numbers? 5↵ 
297^2 = 88209 
88 + 209 = 297 
703^2 = 494209 
494 + 209 = 703 
999^2 = 998001 
998 + 1 = 999 
2223^2 = 4941729 
494 + 1729 = 2223 
2728^2 = 7441984 
744 + 1984 = 2728 
Submission and Marking 
• Your program file name shall be kaprekar.cpp. Submit the file in Blackboard 
(https://blackboard.cuhk.edu.hk/). 
• Insert your name, student ID, and e-mail as comments at the beginning of your source file. 
• You can submit your assignment multiple times. Only the latest submission counts. 
• Your program should be free of compilation errors and warnings. 
• Your program should include suitable comments as documentation. 
• Do NOT share your work to others and do NOT plagiarize. Both senders and plagiarists shall be 
penalized. 

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp






 

掃一掃在手機打開當前頁
  • 上一篇:代寫FIT2107、代做Python設計編程
  • 下一篇:FIT2102代做、代寫Java/Python設計程序
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 wps 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    欧美日韩一区在线观看视频| 欧美一区2区三区4区公司二百| 国产欧美日韩综合精品| 欧美国产日韩激情| 欧美亚洲国产视频小说| 青青影院一区二区三区四区| 欧洲精品在线播放| 欧美一区视频在线| 精品视频导航| 国产日韩欧美在线看| 国产精品一区二区三区久久| 日日橹狠狠爱欧美超碰| 亚州av一区二区| 日韩中文字幕组| 日韩视频在线观看视频| 欧美久久综合性欧美| 欧美午夜精品久久久久免费视| 欧美在线观看日本一区| 麻豆精品视频| 91免费黄视频| 国产xxxx振车| 久久精品色欧美aⅴ一区二区| 国产精品日韩三级| 91高潮精品免费porn| 69精品丰满人妻无码视频a片| 国产精品一区二区久久国产| 91麻豆蜜桃| 99视频精品免费| 久久综合中文色婷婷| 日韩中文综合网| 国产精品成熟老女人| 亚洲美女网站18| 日韩精品 欧美| 国产欧美一区二区三区久久人妖| 91精品国产网站| 啊v视频在线一区二区三区| 久久成人一区二区| 天天干天天操天天干天天操| 男人舔女人下面高潮视频| 高清国产一区| 久久久久久久有限公司| 久久99精品久久久久久琪琪| 亚洲三区视频| 欧美日韩第二页| 成人在线一区二区| 久久九九有精品国产23| 亚洲综合在线播放| 欧美亚洲日本在线观看| 成人av中文| 国产精品免费区二区三区观看| 亚洲**2019国产| 欧美不卡1区2区3区| 久久久久久a亚洲欧洲aⅴ| 精品免费二区三区三区高中清不卡| 涩涩日韩在线| 国产欧美在线看| 国产成人精品自拍| 亚洲黄色成人久久久| 国产中文字幕乱人伦在线观看| 久久av高潮av| 伊人久久大香线蕉综合75| 黄色动漫网站入口| 久久久久久久久久久网站| 亚洲精品日韩精品| 国产乱肥老妇国产一区二| 国产精品日韩一区二区| 热久久精品免费视频| 岛国视频一区| 国产精品亚洲不卡a| 精品国产一区二区三区四区在线观看 | 亚洲一区二区精品在线| 黄色网zhan| y97精品国产97久久久久久| 亚洲黄色网址在线观看| 国产狼人综合免费视频| 国产精品久久9| 欧美视频第一区| 久久er99热精品一区二区三区| 亚洲不卡中文字幕| 91久久国产自产拍夜夜嗨| 欧美精品做受xxx性少妇| 欧美日韩电影一区二区三区| 国产福利不卡| 欧美一区二区三区四区在线 | 国产成人综合亚洲| 亚洲精品9999| av网站在线观看不卡| 亚洲综合中文字幕在线| 国产久一道中文一区| 欧美另类99xxxxx| 黑人中文字幕一区二区三区| 国产精品免费一区二区三区四区| 欧美亚洲国产精品| 国产精品视频播放| 精品一区久久久久久| 九九精品在线播放| 国产日韩成人内射视频| 欧美精品亚州精品| 国产精品一区二区三区久久久 | 亚洲a级在线播放观看| 狠狠噜天天噜日日噜| 国产精品久久久久久久久影视| 国内免费久久久久久久久久久| 国产精品久久不能| 国产欧美一区二区三区久久| 久久久久久com| 91精品国产精品| 日韩偷拍一区二区| 久久九九亚洲综合 | 91精品啪aⅴ在线观看国产| 婷婷久久伊人| 菠萝蜜影院一区二区免费| 黄色国产小视频| 久久综合电影一区| 97成人在线免费视频| 日本黄网站色大片免费观看| 国产精品日韩一区二区三区| 国产免费黄色一级片| 日本一区免费| 国产精品美女在线| 福利视频久久| 日韩欧美猛交xxxxx无码| 国产精品对白一区二区三区| www.九色.com| 日韩免费av一区二区| 欧美精品在线极品| 久久精品中文字幕一区二区三区| 狠狠爱一区二区三区| 中文字幕一区二区三区四区五区六区 | 日韩精品久久一区| 国产精品区免费视频| 成人精品网站在线观看| 日本高清不卡在线| 久久成人18免费网站| 国产精品99一区| 欧美一二三视频| 亚洲专区在线视频| 国产精品色午夜在线观看| 成人a免费视频| 欧美日韩电影一区二区三区| 亚洲一区二区中文字幕| 日韩少妇与小伙激情| 成人精品一区二区三区电影黑人 | 亚洲欧美国产不卡| 久久精品国产2020观看福利| 高清视频在线观看一区| 欧美怡红院视频一区二区三区| 久久久久久高潮国产精品视| 深夜成人在线观看| 91精品在线播放| 国产欧美一区二区三区久久| 欧美日韩午夜爽爽| 欧美一级免费播放| 中文字幕成人一区| 国产精品日韩三级| 久久av综合网| av免费观看国产| 国精产品一区一区三区视频| 热久久视久久精品18亚洲精品| 亚洲欧洲另类精品久久综合| 欧美精品在线免费播放| 国产精品美女免费| 国产精品视频一| 日韩中文有码在线视频| 国产激情综合五月久久| 国产欧美日韩网站| 免费人成在线观看视频播放| 欧洲精品久久| 日本精品免费| 日本一区二区黄色| 无码人妻精品一区二区三区66| 中文精品无码中文字幕无码专区 | 国产aaa免费视频| 国产精品久久久久久久久免费| 久久精品福利视频| www.美女亚洲精品| 日韩视频在线免费| 日韩日本欧美亚洲| 色天天综合狠狠色| www国产亚洲精品久久网站| 久久国产精品一区二区三区四区| 国产精品99久久久久久大便| 国产精品精品国产| 久久精品五月婷婷| 91精品国产自产91精品| 国产精品夜间视频香蕉| 国产日韩精品在线播放| 国产一区二区中文字幕免费看| 欧美日韩国产精品激情在线播放| 青青草精品视频在线| 欧美在线日韩精品| 激情伊人五月天| 免费国产成人看片在线| 精品一区二区三区日本| 国产在线视频一区| 国产区精品在线观看| av免费精品一区二区三区| 91精品视频在线免费观看| 久久99导航| 国产精品久久久一区二区三区|