Find Jobs
Hire Freelancers

C++ help

$30-5000 USD

Closed
Posted almost 15 years ago

$30-5000 USD

Paid on delivery
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++
Project ID: 2794153

About the project

30 proposals
Remote project
Active 15 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
30 freelancers are bidding on average $58 USD for this job
User Avatar
See private message.
$204 USD in 10 days
5.0 (28 reviews)
5.1
5.1
User Avatar
See private message.
$5.95 USD in 10 days
5.0 (47 reviews)
4.9
4.9
User Avatar
See private message.
$12.75 USD in 10 days
4.9 (32 reviews)
4.7
4.7
User Avatar
See private message.
$21.25 USD in 10 days
5.0 (22 reviews)
4.6
4.6
User Avatar
See private message.
$85 USD in 10 days
4.4 (19 reviews)
4.6
4.6
User Avatar
See private message.
$22.95 USD in 10 days
5.0 (38 reviews)
3.7
3.7
User Avatar
See private message.
$21.25 USD in 10 days
5.0 (31 reviews)
3.9
3.9
User Avatar
See private message.
$85 USD in 10 days
5.0 (9 reviews)
2.9
2.9
User Avatar
See private message.
$8.50 USD in 10 days
5.0 (11 reviews)
2.8
2.8
User Avatar
See private message.
$21.25 USD in 10 days
5.0 (2 reviews)
2.3
2.3
User Avatar
See private message.
$12.75 USD in 10 days
5.0 (10 reviews)
2.2
2.2
User Avatar
See private message.
$24.65 USD in 10 days
5.0 (7 reviews)
2.4
2.4
User Avatar
See private message.
$67.15 USD in 10 days
5.0 (1 review)
2.3
2.3
User Avatar
See private message.
$12.75 USD in 10 days
4.9 (5 reviews)
2.1
2.1
User Avatar
See private message.
$5.95 USD in 10 days
5.0 (2 reviews)
0.5
0.5
User Avatar
See private message.
$17 USD in 10 days
5.0 (1 review)
0.7
0.7
User Avatar
See private message.
$12.75 USD in 10 days
5.0 (2 reviews)
0.3
0.3
User Avatar
See private message.
$12.75 USD in 10 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$42.50 USD in 10 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$17 USD in 10 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
United States
0.0
0
Member since Jun 29, 2009

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.