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

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

ISOM 3029 程序代做 Using C++

時間:2023-11-22  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯


ISOM 3029 - Computer Programming Using C++
2023/2024 (Fall Semester)
Assignment 1
Due date: Nov. 20, 2023 (Session 002) & Nov. 21, 2023 (Session 001) in class
Instructions:
 Read the Assignment Requirements posted in the UMMoodle before attempting to solve the
following problems with C++ programs.
 Both the hardcopy and softcopy of your assignment should be submitted on time. All
programs (.cpp files) are to be compressed and uploaded to the UMMoodle under the
“Submit Assignment 1” button. The compressed file should be named with your student
number such as “ba12345_Ass1.zip”.
Question 1: Lottery Program (50%)
Write a C++ program that outputs a greeting message at the beginning, then generates 6 positive
random digits with different values ranging from 1 to 9 for a lottery game. The program prompts the
user to input 6 positive digits and then checks if there is an exact match of all the 6 numbers. It will
output different awards for different matches according to the following rules: Win $5000 for 6 correct
matches, $3000 for 5 correct matches, and $1000 for 4 correct matches. Your program should allow
the user to choose to continue or not and will output a message to end the program.
(Bonus part: Try to include some error-checking as shown below.)
Sample Input & Output:
================================
Welcome to the Lottery Program!
================================
Please enter 6 different positive digits: 1 6 2 4 **
The 6 drawn numbers are: 3 4 2 6 1 7
You have 6 correct matches! You win $5000!
Would you like to continue (Y for Yes, N for No)? Y
++++++++++++++++++++++++++++++++++++++++++++++++++++
Please enter 6 different positive digits: 5 1 2 7 4 3
The 6 drawn numbers are: 5 3 2 6 1 7
P.2
You have 5 correct matches! You win $3000!
Would you like to continue (Y for Yes, N for No)? Y
++++++++++++++++++++++++++++++++++++++++++++++++++++
Please enter 6 different positive digits: 1 9 2 8 **
The 6 drawn numbers are: 8 9 4 6 1 7
You have 4 correct matches! You win $1000!
Would you like to continue (Y for Yes, N for No)? Y
++++++++++++++++++++++++++++++++++++++++++++++++++++
Please enter 6 different positive digits: 1 6 8 9 5 3
The 6 drawn numbers are: 3 4 2 6 1 7
You have 3 correct matches! Sorry, no prize for you!
Would you like to continue (Y for Yes, N for No)? Y
++++++++++++++++++++++++++++++++++++++++++++++++++++
Please enter 6 different positive digits: 1 2 3 -5 6 9
Your input is invalid! Please try again!
Would you like to continue (Y for Yes, N for No)? N
++++++++++++++++++++++++++++++++++++++++++++++++++++
Please enter 6 different positive digits: 1 2 3 6 6 9
Your input is invalid! Please try again!
Would you like to continue (Y for Yes, N for No)? N
++++++++++++++++++++++++++++++++++++++++++++++++++++
Thank you very much!
Question 2: Sales System (50%)
A sportswear shop at a certain outlet launches promotional sales during the New Year. It advertises
that all sports-shoes are 10% off. If the customer buys 2 pairs (with each pair being above $200), an
additional 10% off will be applied. If the customer buys 3 pairs (with each pair being above $200),
an additional 15% off will be applied. If the customer buys 4 pairs or more (with each pair being
above $200), an additional 20% off will be applied. For sports-shoes below $200, only the original
advertised 10% off will be effective. For example, if the customer buys 2 pairs priced at $300 each,
the price after discount will be $300x2x0.9x0.9=$486 plus sales tax. If the customer buys 2 pairs
priced at $300 each and 1 pair priced at $100, the price after discount will be
$300x2x0.9x0.9+$100x0.9=$576 plus sales tax.
Write a C++ program that will print the total price that the customer should pay, by asking the salesgirl
to input the sales tax (e.g. input 5 for 5%), the number of purchased shoes, and the retail prices of the
P.3
purchased sports-shoes one by one. The program will help to calculate the total price after considering
the sales promotion as advertised and the sales tax. The total price will be rounded to the nearest dollar,
without charging any extra cents (e.g., if the calculated total price is $580.5, the total price being
charged will be $580.00 only). (Bonus part: Try to think of some error-checking for user inputs.)
Sample Input & Output:
===========================
Welcome to the Sales System
===========================
Please enter sales tax in % : 5
Number of purchased shoes : 2
Retail Price for shoes 1 : $300
Retail Price for shoes 2 : $300
-----------------------------------------
Less: Discount applied : $114.00
Total price before tax : $486.00
Total price after tax (5%) : $510.00
-----------------------------------------
Do you wish to continue? (Y/N) Y
===========================
Welcome to the Sales System
===========================
Please enter sales tax in % : 6
Number of purchased shoes : 3
Retail Price for shoes 1 : $299
Retail Price for shoes 2 : $100
Retail Price for shoes 3 : $800
-----------------------------------------
Less: Discount applied : $218.81
Total price before tax : $980.19
Total price after tax (6%) : $1039.00
-----------------------------------------
Do you wish to continue? (Y/N) Y
===========================
Welcome to the Sales System
===========================
Please enter sales tax in % : 5.5
Number of purchased shoes : 4
Retail Price for shoes 1 : $500
Retail Price for shoes 2 : $100
Retail Price for shoes 3 : $699
Retail Price for shoes 4 : $1200
-----------------------------------------
Less: Discount applied : $5**.76
Total price before tax : $1925.24
Total price after tax (5.5%): $2031.00
-----------------------------------------
Do you wish to continue? (Y/N) N
Thank you very much!
請加QQ:99515681 或郵箱:99515681@qq.com   WX:codehelp

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

    合肥圖文信息
    流體仿真外包多少錢_專業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在线免费观看
    国产精品久久久久不卡| 久久综合狠狠综合久久综青草| 黄色一级片黄色| 91成人精品网站| 精品久久久久久久久久中文字幕| 青青在线视频免费观看| 97精品一区二区三区| 欧美区二区三区| 国产在线久久久| 国产精品久久久久久久久免费看| 欧美一区视频在线| 久久久噜久噜久久综合| 天天在线免费视频| 91国产精品视频在线| 一区二区三区的久久的视频| 国产美女精品在线观看| 精品免费二区三区三区高中清不卡| 青草热久免费精品视频| 久久九九视频| 岛国一区二区三区高清视频| 91精品在线播放| 亚洲国产成人不卡| 久久久亚洲综合网站| 懂色中文一区二区三区在线视频| av一区观看| 动漫一区二区在线| 69**夜色精品国产69乱| 色噜噜狠狠色综合网| 久久久综合香蕉尹人综合网| 日韩专区第三页| 久久精品国产美女| 欧美性大战久久久久xxx| 久久久久久久久久久久久国产| 日韩高清国产一区在线观看 | 久久免费视频网| 色欲色香天天天综合网www| 久久精品一区二区三区不卡免费视频 | 久久久久久久久久久久av| 日韩精品一区二区三区久久| 久久久www成人免费精品| 虎白女粉嫩尤物福利视频| 九九综合九九综合| 国产欧美日韩专区发布| 中文字幕在线中文字幕日亚韩一区| www.av一区视频| 日本在线播放一区| 国产精品美女免费| 国产伦精品一区二区三区四区视频_| 中文字幕久久综合| 久久精品综合一区| 国内偷自视频区视频综合| 欧美激情伊人电影| 国产盗摄视频在线观看| 欧美国产激情视频| 伊人久久大香线蕉午夜av| 久久久视频精品| 精品日产一区2区三区黄免费 | 国产精品久久久久久久久久久久午夜片 | 精品1区2区| 欧美激情精品久久久久久黑人| 99视频精品免费| 欧洲亚洲在线视频| 九九精品在线播放| 91精品久久久久久久久久久久久| 日韩美女中文字幕| 欧美日韩国产第一页| 69av视频在线播放| 美女一区视频| 日韩资源av在线| 欧美精品在线观看| 日韩在线www| 国产精品亚洲一区| 欧美影院久久久| 一区二区不卡在线观看| 色老头一区二区三区在线观看| 国产伦精品一区二区三区免费视频| 欧美一区二区三区……| 国产精品久久久久久久久| av在线不卡观看| 黄色www在线观看| 性色av一区二区三区在线观看| 国产精品久久亚洲| 久久免费视频网站| 国产综合第一页| 日本黄网免费一区二区精品| 精品国产av无码一区二区三区| 久久精品国产sm调教网站演员| 国产久一道中文一区| 欧美诱惑福利视频| 视频一区二区在线观看| 欧美激情在线有限公司| 国产精品免费在线免费| 久久久性生活视频| yellow视频在线观看一区二区| 欧美中文在线观看| 动漫3d精品一区二区三区| 欧美成人免费va影院高清| 日韩中文字幕在线播放| 91精品91久久久久久| 国产啪精品视频网站| 欧美久久在线观看| 日本成熟性欧美| 懂色一区二区三区av片| 在线天堂一区av电影| 久久夜色精品亚洲噜噜国产mv | 国产欧美日本在线| 欧美韩国日本在线| 日韩av中文字幕第一页| 亚洲一区二区三区在线观看视频| 国产精品国语对白| 国产精品污www一区二区三区| 国产va亚洲va在线va| 91精品国产91久久久久福利| 国产精品亚洲αv天堂无码| 国产熟女高潮视频| 国产一区二区三区免费不卡| 美女精品国产| 国产一区二区三区四区五区在线| 激情视频在线观看一区二区三区| 欧美亚洲另类制服自拍| 欧美深夜福利视频| 欧美在线视频一区二区三区| 午夜老司机精品| 亚洲一区二区在线免费观看| 亚洲精品中文字幕乱码三区不卡| 尤物一区二区三区| 最新中文字幕久久| 亚洲五月六月| 亚洲一区二区三区四区视频| 亚洲国产精品久久久久婷婷老年| 一区二区不卡在线观看| 亚洲综合激情五月| 午夜探花在线观看| 日本最新高清不卡中文字幕 | 国产精品美女主播在线观看纯欲 | 中文字幕日韩一区二区三区| 一区二区不卡在线视频 午夜欧美不卡' | 亚洲欧美久久234| 亚洲精品免费av| 日韩一级在线免费观看| 三年中国中文在线观看免费播放| 日韩视频在线观看国产| 欧美在线一级视频| 麻豆一区区三区四区产品精品蜜桃 | 久热精品视频在线| 国产精品国产三级欧美二区| 欧美精品亚州精品| 亚洲一区二区三区免费观看| 日本最新高清不卡中文字幕| 欧美凹凸一区二区三区视频| 麻豆中文字幕在线观看| 国产九区一区在线| 久久亚裔精品欧美| www.日韩不卡电影av| 国产精品国产福利国产秒拍| 欧美日本高清一区| 视频一区三区| 欧美日韩另类丝袜其他| 国产一区二区精品在线| av久久久久久| 久久久久久精| 国产精品精品国产| 亚洲女人毛片| 欧美在线中文字幕| 国产精品一区在线免费观看| 国产精品99久久久久久人| 久久久久久久一区二区三区| 国产精品久久久久久一区二区| 亚洲伊人婷婷| 欧美在线影院在线视频| 国产九九九九九| 久久久久久久久久久免费| 欧美大成色www永久网站婷| 亚洲国产精品毛片| 精品人伦一区二区三区| 成人久久一区二区三区| 国产不卡一区二区在线观看| 国产精品久久久久久久av大片| 亚洲**2019国产| 国语自产精品视频在免费| 成人中文字幕av| 色婷婷av一区二区三区在线观看| 九九精品在线观看| 日本不卡在线观看| 国产精品综合久久久| 久草视频国产在线| 欧美激情在线一区| 欧美在线视频免费| www.九色.com| 久久亚洲精品国产亚洲老地址| 日韩高清专区| 99热成人精品热久久66| 国产精品美女视频网站| 色播亚洲婷婷| www.av中文字幕| 国产精品免费一区二区三区 | 国产成人精品视| 一区二区在线高清视频| 欧美日韩精品免费看| 91av福利视频|