99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

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

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設計程序
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

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

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

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                精品成人一区二区三区四区| 日韩成人午夜电影| 岛国av在线一区| 成人免费在线视频观看| caoporm超碰国产精品| 国产乱色国产精品免费视频| 波多野洁衣一区| 日韩一级免费一区| 午夜成人免费电影| 91在线观看成人| 日韩欧美二区三区| 成人综合在线视频| 亚洲国产欧美在线| 精品免费视频.| 91香蕉视频污在线| 久久er99精品| 亚洲va欧美va天堂v国产综合| 欧美电视剧免费观看| 91麻豆国产在线观看| 精品中文字幕一区二区小辣椒| 亚洲欧美日韩一区二区三区在线观看| 欧美一级久久久| 91网站最新地址| 狠狠色丁香久久婷婷综合_中| 中文字幕在线免费不卡| 日韩欧美成人激情| 欧美手机在线视频| av一区二区不卡| 国产剧情一区二区| 麻豆freexxxx性91精品| 一区二区三区在线观看动漫 | 国产亚洲欧美在线| 国产精品乡下勾搭老头1| 亚洲国产日韩av| 国产精品国产三级国产aⅴ中文| 日韩一区二区在线观看视频 | 日韩精品一区二| 欧美亚洲免费在线一区| www.日韩av| 国产在线不卡视频| 看电影不卡的网站| 日韩高清在线不卡| 亚洲成人动漫av| 亚洲亚洲精品在线观看| 亚洲色大成网站www久久九九| 国产欧美一区二区精品婷婷| 欧美日韩色一区| 欧美网站一区二区| 3d成人动漫网站| 99精品视频一区二区三区| 一区二区三区四区精品在线视频| 欧美二区在线观看| av福利精品导航| 久久99最新地址| 亚洲婷婷综合色高清在线| 久久综合精品国产一区二区三区| av不卡免费电影| 亚洲乱码国产乱码精品精小说| 国产精品电影一区二区| 中文字幕精品—区二区四季| 久久久99久久| 中文字幕一区免费在线观看| 国产精品无码永久免费888| 国产精品一区免费在线观看| 午夜私人影院久久久久| 国产女主播一区| 欧美日韩一级片在线观看| 国产精品66部| 福利一区二区在线| 国产精品久久久久一区| 精品女同一区二区| 欧美日韩精品久久久| 亚洲1区2区3区视频| 亚洲午夜在线观看视频在线| 亚洲人成人一区二区在线观看| 久久精品在线免费观看| 99视频热这里只有精品免费| 一区二区三区在线观看视频| 图片区日韩欧美亚洲| 欧美系列日韩一区| 欧美日韩一区 二区 三区 久久精品| 美女网站色91| 亚洲精品久久久蜜桃| www.日韩在线| 亚洲精品国产视频| 精品成人一区二区| 欧美色涩在线第一页| 欧美成人女星排行榜| 成人精品国产免费网站| 欧美日韩视频第一区| 6080日韩午夜伦伦午夜伦| 精品久久一二三区| 国产成人综合视频| 欧美性一二三区| 成人一道本在线| 久久av中文字幕片| 波多野结衣中文字幕一区二区三区| 国产精品一品视频| 在线欧美日韩国产| 99九九99九九九视频精品| 在线观看不卡一区| 久久精品一区二区三区av| 亚洲精品va在线观看| 国产激情91久久精品导航 | 91福利资源站| 六月丁香婷婷色狠狠久久| 欧美私模裸体表演在线观看| 欧美精品一区二区三区四区| 亚洲视频一区在线观看| 午夜av一区二区| 波多野结衣中文一区| 国产日产欧美一区二区视频| 国产精品嫩草久久久久| 极品美女销魂一区二区三区免费 | 国产综合色在线| 狠狠色狠狠色综合| 在线视频综合导航| 日韩在线a电影| 欧美一级搡bbbb搡bbbb| 亚洲国产精品久久人人爱| 精品国产自在久精品国产| 欧美性猛交一区二区三区精品| 亚洲精品日产精品乱码不卡| 九九**精品视频免费播放| 久久国产精品第一页| 色av综合在线| 国产精品白丝在线| 成人伦理片在线| 国产精品国产自产拍高清av | 国产一区二区三区电影在线观看| 91精品久久久久久久99蜜桃| 亚洲国产视频网站| 欧美色欧美亚洲另类二区| 性做久久久久久| 精品91自产拍在线观看一区| 老司机精品视频一区二区三区| 99精品视频在线观看免费| 亚洲天堂精品在线观看| 99精品久久99久久久久| 综合亚洲深深色噜噜狠狠网站| 91麻豆国产香蕉久久精品| 亚洲一区二区不卡免费| 欧美福利视频一区| 久久av资源网| 欧美国产精品中文字幕| 99国产精品一区| 日韩高清不卡在线| 国产精品午夜电影| 久久亚洲精精品中文字幕早川悠里| 欧美三级蜜桃2在线观看| 成人免费看的视频| 三级影片在线观看欧美日韩一区二区 | 91黄色激情网站| 亚洲一区二区三区自拍| 精品日韩在线一区| 91高清视频在线| 国产麻豆欧美日韩一区| 亚洲丝袜自拍清纯另类| 26uuu另类欧美| 欧美日韩在线电影| 色狠狠色噜噜噜综合网| 成人在线视频一区二区| 精品一区二区三区久久| 亚洲二区视频在线| 亚洲一区视频在线| 一区二区三区在线播放| 国产日韩精品一区二区三区 | 国产精品美日韩| 国内久久精品视频| 丝袜亚洲另类欧美| 婷婷夜色潮精品综合在线| 成av人片一区二区| 国产精品888| 国产福利电影一区二区三区| 久久精品国产久精国产| 美女高潮久久久| 精品一区二区av| 国产一区二区三区日韩| 精品一区二区在线视频| 久久99精品久久久久久动态图| 免费久久99精品国产| 美国十次综合导航| 国产精品12区| 欧美午夜精品免费| 久久免费看少妇高潮| 欧美国产1区2区| 国产亚洲精品资源在线26u| 国产一区二区三区精品欧美日韩一区二区三区 | 亚洲精品成人悠悠色影视| 综合精品久久久| 成人午夜免费av| 色综合一区二区| 中文字幕在线一区免费| 婷婷开心激情综合| 欧美成人精品3d动漫h| 狠狠色2019综合网| 亚洲精品在线免费播放| 亚洲一区二区中文在线| 国产一区二区在线看| 亚洲色图视频免费播放|