Find Jobs
Hire Freelancers

C++ help

$30-5000 USD

已关闭
已发布将近 15 年前

$30-5000 USD

货到付款
only use the cin and cout object in the main function of your program. You must also create at least one other function outside of main. Write a program that determines the day of the week for a given date. You can invent your own complex algorithm that takes into account the special leap year rules, and changes in calendars, but this is a case where it makes sense to look for things that are familiar. you will find that there is a standard way or representing a date, called the Julian Day Number (JDN). This is the number of days that have elapsed since January 1, 4713 BC. Given the JDN for a date, there is a simple formula that tells the day of the week: DayofWeek = (JDN + 1) % 7 The result is in the range of 0 to 6, with 0 representing Sunday. The only remaining problem is how to compute the JDN, which is not so simple. The algorithm computes several intermediate results that are added together to give the JDN. We look at the computation of each of these three intermediate values in turn. If the date comes from the Gregorian calendar (later than October 15, 1582), then compute intRes1 with the following formula, otherwise let intRes1 be zero. intRes1 = 2 ??" year / 100 + year / 400 (integer division) The second intermediate result is computed as follows: intRes2 = int(365.25 * year) We compute the third intermediate value with this formula: intRes3 = int(30.6001 * (month + 1) ) Finally, the JDN is computed this way: JDN = intRes1 + intRes2 + intRes3 + day + 1720994.5 Your program should make appropriate use of value-returning functions in solving this program. These formulas require nine significant digits; you may have to use the integer type long and the floating-point type double. Your program should prompt appropriately for input of the date, and properly label the output. Use proper coding style with comments to document the algorithm as needed. ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition, as follows? (depending on the nature? of the deliverables): a)? For web sites or? other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment. b) For all others including desktop software or software the buyer intends to distribute: A software? installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request. 3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). ## Platform Dev C++
项目 ID: 2794153

关于此项目

30提案
远程项目
活跃15 年前

想赚点钱吗?

在Freelancer上竞价的好处

设定您的预算和时间范围
为您的工作获得报酬
简要概述您的提案
免费注册和竞标工作
30威客以平均价$58 USD来参与此工作竞价
用户头像
See private message.
$204 USD 在10天之内
5.0 (28条评论)
5.1
5.1
用户头像
See private message.
$5.95 USD 在10天之内
5.0 (47条评论)
4.9
4.9
用户头像
See private message.
$12.75 USD 在10天之内
4.9 (32条评论)
4.7
4.7
用户头像
See private message.
$21.25 USD 在10天之内
5.0 (22条评论)
4.6
4.6
用户头像
See private message.
$85 USD 在10天之内
4.4 (19条评论)
4.6
4.6
用户头像
See private message.
$22.95 USD 在10天之内
5.0 (38条评论)
3.7
3.7
用户头像
See private message.
$21.25 USD 在10天之内
5.0 (31条评论)
3.9
3.9
用户头像
See private message.
$85 USD 在10天之内
5.0 (9条评论)
2.9
2.9
用户头像
See private message.
$8.50 USD 在10天之内
5.0 (11条评论)
2.8
2.8
用户头像
See private message.
$21.25 USD 在10天之内
5.0 (2条评论)
2.3
2.3
用户头像
See private message.
$12.75 USD 在10天之内
5.0 (10条评论)
2.2
2.2
用户头像
See private message.
$24.65 USD 在10天之内
5.0 (7条评论)
2.4
2.4
用户头像
See private message.
$67.15 USD 在10天之内
5.0 (1条评论)
2.3
2.3
用户头像
See private message.
$12.75 USD 在10天之内
4.9 (5条评论)
2.1
2.1
用户头像
See private message.
$5.95 USD 在10天之内
5.0 (2条评论)
0.5
0.5
用户头像
See private message.
$17 USD 在10天之内
5.0 (1条评论)
0.7
0.7
用户头像
See private message.
$12.75 USD 在10天之内
5.0 (2条评论)
0.3
0.3
用户头像
See private message.
$12.75 USD 在10天之内
0.0 (0条评论)
0.0
0.0
用户头像
See private message.
$42.50 USD 在10天之内
0.0 (0条评论)
0.0
0.0
用户头像
See private message.
$17 USD 在10天之内
0.0 (0条评论)
0.0
0.0

关于客户

UNITED STATES的国旗
United States
0.0
0
会员自6月 29, 2009起

客户认证

谢谢!我们已通过电子邮件向您发送了索取免费积分的链接。
发送电子邮件时出现问题。请再试一次。
已注册用户 发布工作总数
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
加载预览
授予地理位置权限。
您的登录会话已过期而且您已经登出,请再次登录。