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;">

                亚洲精品一区二区三区精华液 | eeuss鲁一区二区三区| 亚洲va欧美va天堂v国产综合| 一区二区久久久| 亚洲日本免费电影| 亚洲欧洲另类国产综合| 国产精品久久久久久久久果冻传媒 | 久久色在线观看| 欧美videossexotv100| 欧美亚一区二区| 成人精品鲁一区一区二区| 欧美精品日韩综合在线| 韩国欧美一区二区| 日韩一区在线看| 欧美日韩精品欧美日韩精品一综合| 日韩激情av在线| 国产亚洲自拍一区| 在线观看不卡一区| 国产成人aaaa| 蜜桃视频在线一区| 亚洲综合一二区| 国产网站一区二区| 欧美精品成人一区二区三区四区| 国产精华液一区二区三区| 五月开心婷婷久久| 一区二区三区**美女毛片| 成人h精品动漫一区二区三区| 欧美特级限制片免费在线观看| 日本vs亚洲vs韩国一区三区| 国产精品人妖ts系列视频| 欧美视频在线观看一区二区| 国产在线精品一区二区夜色| 一区二区三区免费在线观看| 久久亚洲免费视频| 欧美高清激情brazzers| 91女人视频在线观看| 国产**成人网毛片九色| 美日韩一级片在线观看| 一区二区在线观看免费| 久久精品男人天堂av| 欧美久久久久久久久久| 欧美性生活久久| 一区二区三区91| 亚洲伦理在线免费看| 久久精品国产免费| 欧洲一区在线电影| 国产亚洲一区二区三区四区 | 午夜电影网一区| 韩国成人在线视频| 欧美性大战久久久久久久蜜臀| 欧美大黄免费观看| 亚洲欧美色图小说| 国产福利一区二区三区| 欧美人与禽zozo性伦| 中文字幕制服丝袜成人av| 免费成人av在线| 91无套直看片红桃| 国产拍欧美日韩视频二区| 五月婷婷欧美视频| 97精品超碰一区二区三区| 日韩欧美国产一区二区在线播放 | 婷婷综合五月天| 91丨九色丨黑人外教| 欧美精品一区二区蜜臀亚洲| 日韩经典一区二区| 成人网页在线观看| 精品久久五月天| 日韩和欧美一区二区| 亚洲色大成网站www久久九九| 中文字幕一区av| 国内精品国产成人| 欧美日韩亚洲综合在线 | 视频在线在亚洲| 欧美亚洲愉拍一区二区| 亚洲天堂久久久久久久| 成人va在线观看| 中文字幕精品三区| 成人性生交大片免费| 国产日韩精品一区二区三区在线| 极品少妇xxxx精品少妇| 日韩精品一区二区三区在线播放 | 久久久美女毛片| 秋霞电影网一区二区| 欧美日韩你懂得| 国产一区在线看| 国产91对白在线观看九色| 欧美视频一区二区三区四区| 久久久久久久综合日本| 樱花影视一区二区| 激情五月激情综合网| 欧美亚洲国产一区二区三区va | 中文字幕va一区二区三区| 国产亚洲制服色| 香蕉久久一区二区不卡无毒影院| 欧美日韩成人一区二区| 毛片av中文字幕一区二区| 2023国产精品| 成av人片一区二区| 亚洲综合在线视频| 欧美精品一级二级三级| 久久激情五月婷婷| 亚洲国产精品高清| 日本丶国产丶欧美色综合| 亚洲成人资源在线| 日韩欧美激情在线| 成人夜色视频网站在线观看| 亚洲精品成人精品456| 在线成人免费视频| 国产在线视频一区二区| 1000精品久久久久久久久| 欧美精品一区二区在线播放| 国产日韩精品一区| 精品一区二区综合| 精品欧美乱码久久久久久1区2区| 亚洲电影欧美电影有声小说| 91日韩精品一区| 亚洲精品视频观看| 91在线免费播放| 亚洲精品少妇30p| 91电影在线观看| 亚洲一区二区三区四区在线观看| 99久久777色| 亚洲男人电影天堂| 欧美午夜精品理论片a级按摩| 亚洲综合在线第一页| 在线欧美日韩国产| 亚洲福利一区二区| 555www色欧美视频| 美日韩一区二区| 久久这里只精品最新地址| 伊人一区二区三区| 欧美日韩国产高清一区二区三区| 一区二区三区av电影| 精品视频在线免费看| 亚洲午夜久久久久久久久电影院| 色噜噜狠狠成人中文综合| 亚洲精品视频一区| 51午夜精品国产| 国内精品不卡在线| 亚洲日韩欧美一区二区在线| 欧美日韩在线亚洲一区蜜芽| 麻豆视频观看网址久久| 国产情人综合久久777777| 99久久综合99久久综合网站| 日韩美女视频一区二区 | 成人黄色777网| 亚洲精品伦理在线| 欧美日韩精品电影| 极品少妇xxxx精品少妇偷拍| 国产精品视频一二三区| 91国内精品野花午夜精品| 美日韩黄色大片| 中文字幕日韩欧美一区二区三区| 在线观看av不卡| 国产美女视频一区| 一区二区三区丝袜| 久久五月婷婷丁香社区| 亚洲一区免费视频| 欧美国产乱子伦| 国产日本一区二区| 欧美高清在线精品一区| 欧美极品美女视频| 国产欧美一区二区精品秋霞影院 | 日韩女优电影在线观看| 精品1区2区3区| 91精品国产91热久久久做人人| 欧美日韩日日骚| 日韩视频国产视频| 欧美变态tickle挠乳网站| 2017欧美狠狠色| 中文字幕欧美三区| 国产精品九色蝌蚪自拍| 亚洲视频在线观看三级| 亚洲日本乱码在线观看| 午夜视频一区在线观看| 青青草国产成人av片免费| 九一九一国产精品| 国产精品99久久久| 不卡av免费在线观看| 欧美自拍丝袜亚洲| 欧美一级黄色片| 欧美激情在线免费观看| 中文字幕一区av| 午夜久久久久久久久久一区二区| 青青草97国产精品免费观看| 国产大陆精品国产| 欧美性一级生活| 久久伊人蜜桃av一区二区| 国产精品另类一区| 一区二区三区四区国产精品| 日韩av一二三| 成人黄色电影在线 | 亚洲精品国产品国语在线app| 午夜国产不卡在线观看视频| 亚洲免费观看高清完整版在线| 国产精品无人区| 欧美激情综合在线| 国产精品嫩草99a| 日本一区二区视频在线| 国产亚洲一区二区三区在线观看 |