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爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          亚洲欧洲一区二区天堂久久| 欧美成人午夜影院| 91久久精品美女高潮| 欧美久久久久免费| 久久精品国产v日韩v亚洲| 日韩视频一区二区三区| 国产亚洲制服色| 国产精品都在这里| 欧美激情欧美激情在线五月| 欧美一区成人| 亚洲一级在线| 亚洲视频欧美在线| 99综合电影在线视频| 亚洲电影第三页| 伊人久久大香线| 国产在线观看91精品一区| 欧美吻胸吃奶大尺度电影| 欧美成人首页| 欧美1级日本1级| 久久精品国产免费| 久久国产精品久久久| 亚洲欧美在线观看| 亚洲欧美电影院| 亚洲欧美激情精品一区二区| 亚洲一二三区精品| 宅男噜噜噜66一区二区66| 亚洲另类自拍| 亚洲麻豆国产自偷在线| 亚洲另类自拍| 一本一本a久久| 亚洲午夜久久久久久久久电影院| 日韩网站免费观看| 在线亚洲免费| 小黄鸭精品aⅴ导航网站入口| 亚洲免费伊人电影在线观看av| 亚洲影视综合| 欧美一区二区三区精品| 欧美中日韩免费视频| 久久综合色88| 欧美精品尤物在线| 欧美涩涩视频| 国产欧美一区二区三区在线看蜜臀 | 亚洲精品日韩一| 99精品视频一区| 亚洲男人的天堂在线观看| 欧美影院成人| 欧美成人在线免费视频| 国产精品激情偷乱一区二区∴| 国产精品自在线| 亚洲国产人成综合网站| 亚洲图片在线观看| 久久久亚洲欧洲日产国码αv| 麻豆91精品| 欧美精品国产精品| 国产女人精品视频| 亚洲黄色大片| 欧美诱惑福利视频| 欧美精品性视频| 国产偷国产偷精品高清尤物| 亚洲国产精品久久久| 午夜视频在线观看一区二区三区| 久久久久久久久久久久久女国产乱| 欧美激情亚洲自拍| 国产视频观看一区| 夜夜嗨av色综合久久久综合网| 久久精品国产免费观看| 欧美日韩高清免费| 精品av久久707| 亚洲在线电影| 欧美成人免费视频| 国产一区二区精品| 亚洲一区二区在线观看视频| 狂野欧美激情性xxxx欧美| 国产精品一区二区在线| 日韩亚洲国产欧美| 免费不卡欧美自拍视频| 国产亚洲女人久久久久毛片| 一本色道久久综合精品竹菊| 麻豆免费精品视频| 国产亚洲欧美中文| 亚洲欧美日韩视频一区| 欧美日本乱大交xxxxx| 1024成人| 另类av导航| 一区二区三区亚洲| 久久aⅴ乱码一区二区三区| 国产精品高潮呻吟久久av黑人| 1000部精品久久久久久久久| 久久蜜桃资源一区二区老牛 | 亚洲专区在线| 国产精品v日韩精品| 一本色道久久综合亚洲精品小说 | 国产精品任我爽爆在线播放| 亚洲美女少妇无套啪啪呻吟| 欧美激情一区在线| 亚洲激情第一区| 欧美电影在线观看| 亚洲黄色在线观看| 欧美激情精品久久久久久| 亚洲激情啪啪| 欧美日韩国产色站一区二区三区| 日韩网站在线| 国产精品成人一区二区三区吃奶| 一区二区三区欧美日韩| 欧美深夜影院| 欧美综合第一页| 亚洲成人自拍视频| 欧美日本在线一区| 亚洲在线一区| 黄色一区二区三区| 欧美国产日韩二区| 亚洲一区二区三区成人在线视频精品| 欧美日韩八区| 久久精品国产视频| 最新国产成人av网站网址麻豆| 久久激情综合| 国产在线欧美日韩| 亚洲视频图片小说| 欧美激情日韩| 亚洲欧美精品在线观看| 国产欧美综合一区二区三区| 久久免费观看视频| 亚洲深夜福利视频| 国产主播一区二区三区| 牛牛影视久久网| 亚洲影院色在线观看免费| 一区二区三区在线免费播放| 欧美激情综合色| 欧美一区观看| 一本色道久久综合狠狠躁篇的优点 | 亚洲精品美女| 国产情侣一区| 欧美国产日韩a欧美在线观看| 亚洲婷婷国产精品电影人久久| 国产欧美一区二区三区在线老狼| 欧美成人免费一级人片100| 亚洲午夜精品久久久久久浪潮 | 在线观看日韩av| 国产精品欧美精品| 欧美成人在线影院| 久久精品一本久久99精品| a4yy欧美一区二区三区| 一区二区三区中文在线观看 | 久久久久久久91| 亚洲欧美成人一区二区三区| 亚洲国产欧美一区二区三区同亚洲 | 午夜一级久久| 亚洲午夜国产一区99re久久| 亚洲精品视频在线播放| 好吊色欧美一区二区三区四区| 欧美视频在线观看 亚洲欧| 欧美91大片| 久久资源av| 久久精品一区二区三区不卡牛牛| 亚洲在线不卡| 亚洲一卡二卡三卡四卡五卡| 日韩亚洲欧美成人一区| 亚洲黄色高清| 亚洲国产电影| 91久久精品国产91久久| 一区在线观看| 玉米视频成人免费看| 国产又爽又黄的激情精品视频| 国产精品老牛| 国产精品www网站| 欧美日韩伊人| 欧美日韩三级一区二区| 欧美激情第二页| 欧美激情亚洲精品| 欧美色视频在线| 国产精品欧美日韩一区| 国产精品试看| 国产一区二区三区免费不卡 | 久久久久一区| 免费亚洲网站| 欧美日韩精品福利| 国产精品久久久久久久久久免费| 欧美视频精品一区| 国产精品综合网站| 国产日韩在线视频| 在线日韩中文| 日韩午夜在线视频| 亚洲欧美日韩在线| 久久久国产精品一区二区三区| 久久久久久久97| 欧美—级a级欧美特级ar全黄| 欧美精品乱人伦久久久久久| 国产精品va在线播放| 国产欧美日韩一级| 亚洲国产mv| 亚洲永久免费观看| 久久综合久色欧美综合狠狠| 欧美福利一区| 国产精品一页| 亚洲国产日韩欧美在线99| 一区二区三区黄色| 欧美诱惑福利视频| 欧美激情va永久在线播放| 国产精品一级二级三级| 在线欧美日韩国产|