国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女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怎么修改定
  • 短信驗證碼 豆包網頁版入口 破天一劍 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    久久久国产影院| www国产黄色| 国产精品香蕉视屏| 久久久久北条麻妃免费看| 亚洲一区二区三区乱码aⅴ| 蜜桃av久久久亚洲精品| 久久久女女女女999久久| 中文字幕人成一区| 国产在线视频不卡| 国产精品美女视频网站| 色综合久久久久无码专区| 国产女主播av| 国产精品成人久久久久| 激情小视频网站| 久久精品在线播放| 欧美日韩亚洲国产成人| 久久久久这里只有精品| 日本一区二区在线视频观看| 91精品国产91久久久久| 亚洲欧美日韩综合一区| av在线免费观看国产| 伊人久久大香线蕉综合75| 国产剧情日韩欧美| 精品国产一区二区三区日日嗨 | 麻豆av免费在线| 国产精品国色综合久久| 精品少妇在线视频| 久久69精品久久久久久久电影好| 国产欧美精品一区二区三区-老狼| 色综合久久久久久中文网| 国产免费一区二区三区在线观看 | 激情五月开心婷婷| 国产精品果冻传媒潘| 蜜桃日韩视频| 另类专区欧美制服同性| 一级一片免费播放| 国产女教师bbwbbwbbw| 国产精品视频26uuu| 日韩欧美视频一区二区 | 亚洲aaa激情| 91久久久久久久久| 懂色av一区二区三区在线播放| 国产精品一区二区电影| 亚洲自拍欧美色图| 国产欧美精品xxxx另类| 亚洲综合在线中文字幕| 视频一区视频二区视频三区视频四区国产| 不卡影院一区二区| 欧美激情精品久久久| 国产欧美日韩视频| 久99九色视频在线观看| 高清视频一区二区三区| 中文字幕在线亚洲精品| 97国产一区二区精品久久呦| 亚洲乱码国产一区三区| 久久久www免费人成黑人精品 | 男女视频网站在线观看| 国产精品久久久久久久美男| 91高清免费视频| 成人黄色中文字幕| 日韩av片免费在线观看| 久久精品国产一区| 久久亚洲春色中文字幕| 国产精品视频网址| 国内一区二区三区在线视频| 久久中国妇女中文字幕| 国产伊人精品在线| 亚洲一区二区三区四区中文| 久久人人爽人人爽人人片av高请| 日日骚一区二区网站| 久久久久久久91| 欧美日韩黄色一级片| 久久色在线播放| 人妻有码中文字幕| 久久伊人精品视频| 国产另类第一区| 午夜精品一区二区在线观看 | 肉大捧一出免费观看网站在线播放 | 久久久影视精品| 午夜免费日韩视频| 91精品国产99久久久久久红楼| 国产精品午夜视频| 丁香六月激情婷婷| 精品国产一区久久久| 亚洲a级在线播放观看| 久久九九国产精品怡红院| 欧在线一二三四区| 欧美不卡在线一区二区三区| 国产一区一区三区| 免费av网址在线| 久久草视频在线看| 欧美激情中文字幕在线| 国产精品久久久久9999爆乳| av在线不卡观看| 欧美精品一区二区三区久久 | 欧洲精品码一区二区三区免费看| 在线视频福利一区| 久久精品国产精品亚洲精品色 | 日韩一级片免费视频| 日韩亚洲欧美成人| 国产伦理一区二区三区| 日韩av成人在线观看| 国产精品久久久久免费a∨大胸| 97人人模人人爽视频一区二区| 欧美亚洲一级二级| 亚洲天堂电影网| 久久精品成人一区二区三区| 国产精品午夜国产小视频| 欧美日韩喷水| 无码少妇一区二区三区芒果| 欧美成人在线免费| 久久这里只有精品8| 欧美亚洲黄色片| 亚洲一区二区三区毛片| www.亚洲成人| 久久精品欧美| 99精品人妻少妇一区二区| 激情小视频网站| 日韩中文字幕亚洲精品欧美| 久久成人在线视频| 日韩在线观看高清| 91高清视频免费| 国产美女精品久久久| 青青草精品毛片| 亚洲乱码一区二区三区三上悠亚| 九九久久精品一区| 国产成人看片| 久久久中精品2020中文| 高清国语自产拍免费一区二区三区 | 国产免费一区二区三区视频 | 色天天综合狠狠色| 国产精品ⅴa在线观看h| 国产专区精品视频| 欧美极品欧美精品欧美图片| 无码播放一区二区三区| 一本久道综合色婷婷五月| 国产精品国产一区二区| 欧美 国产 综合| 色一情一乱一伦一区二区三区丨| 色香蕉在线观看| 国产福利精品在线| 美女av一区二区| 久久久国产影院| 久久久免费观看| 97人人模人人爽人人喊38tv| 国产美女精品在线观看| 蜜桃av噜噜一区二区三区| 欧美一级视频免费看| 午夜免费日韩视频| 久久天堂国产精品| 日韩中文在线中文网三级| 色偷偷偷亚洲综合网另类| 国产精品视频精品视频| 国产精品三级久久久久久电影| 久久精品国产欧美亚洲人人爽| 色偷偷88888欧美精品久久久| 久久久久久亚洲精品不卡4k岛国| 国产成人一区二区三区小说| 久久国产精品免费一区| 久久草.com| 久久精品久久久久| www.亚洲一区| 日韩中文字幕久久| 久久精品视频va| 国产精品久久久久免费| 久久久999国产精品| 国产精品久久久久免费a∨ | 在线一区日本视频| www.欧美黄色| 91精品啪在线观看麻豆免费| 国产精品27p| 久草一区二区| 久久色免费在线视频| 国产精品盗摄久久久| 在线国产99| 亚洲字幕一区二区| 日产国产精品精品a∨| 日本成人中文字幕在线| 欧美日韩一区二区三区电影| 免费观看精品视频| 国产欧美日韩最新| 久久伊人一区| 国产精品免费久久久| 中文字幕人成一区| 日韩国产精品一区二区三区| 国模视频一区二区| www.av中文字幕| 国产ts一区二区| 国产精品美女www| 中文字幕在线乱| 午夜精品久久久久久99热| 欧美亚洲免费在线| 国产精品一 二 三| 国产成人av在线播放| 另类天堂视频在线观看| 少妇免费毛片久久久久久久久| 精品999在线观看| 97人人澡人人爽| 久久精品免费电影| 亚洲永久在线观看|