Find Jobs
Hire Freelancers

Basic C++ command line program

$10-30 USD

Completed
Posted over 8 years ago

$10-30 USD

Paid on delivery
This is a kind of C++ game I'm interested in you developing. The game is called "Four is the perfect number." When the program starts, it will say "Enter a number: ". When the user enters a number, the program should count how many letters are in the word for that number in the background, and save that over the variable. Then repeat. All numbers will reduce to four by the end. For example, 3 is spelled "three" and has 5 letters. 5 is spelled "five" and has 4 letters. 4 is spelled "four" and has 4 letters. This program will NOT convert numbers to their word form. This simply counts and adds with loops. Here is an example run: -- Enter a number: 11 11 is 6 6 is 3 3 is 5 5 is 4 4 is 4 Play again? (y/n) -- The variable type should be a "long long int". If the user enters a number greater than one quadrillion or less than negative one quadrillion, the program will output "Please enter a number between -1,000,000,000,000,000 and 1,000,000,000,000,000." If the user enters commas with their number, the commas will be stripped out in the stored variable, and then be added back in for the numbers in the output. One way I think this program could be accomplished is by setting loops for the different number groups and names. For example, if the user enters the number 12,050,000,742 the program will check each group of numbers separately. The program detects the first number in the billion group. It reads nothing from in the "hundred billions" place, so it ignores that place. It reads the 1 which would be "ten" but the because the "one billions" place has a 2, it changes to "twelve", making the total string for that group "twelve billion". The program will also count spaces, and there should be a space counted between every group being used. Next, the program would check the millions place, and it sees 50, so the string for that group would be "fifty million". The program now checks the thousands place, but because the value for this group is 0, is skips over the group. And last the program looks at the first (lowest) group, and sees 742. The string for this would be "seven hundred forty two". So the entire string for this number would be "twelve billion fifty million seven hundred forty two" 12,050,000,742. The program would output this: -- Enter a number: 12,050,000,742 12,050,000,742 is 52 52 is 9 9 is 4 4 is 4 Play again? (y/n) -- If the user uses a negative number, the string for "negative " would be added to the front including the space, which would add 9 to the total count. Example: -8 is "negative eight" which is 14. 14 is "fourteen" which is 8. 8 is "eight" which is 5. 5 is "five" which is 4. Example output: -- Enter a number: -8 -8 is 14 14 is 8 8 is 5 5 is 4 4 is 4 Play again? (y/n) -- If the entire number is 0, then the string is "zero". Example output: -- Enter a number: 0 0 is 4 4 is 4 Play again? (y/n) -- Also, 0 cannot be negative, so -0 will not add "negative ". Example output: -- Enter a number: -0 0 is 4 4 is 4 Play again? (y/n) -- Please let me know if you have any questions. I'm happy to help clarify. Thanks! :)
Project ID: 8575356

About the project

10 proposals
Remote project
Active 8 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
Awarded to:
User Avatar
Hello. It is easy assignment, it can be completed in few hours of pure working time ...................
$15 USD in 1 day
4.9 (573 reviews)
6.7
6.7
10 freelancers are bidding on average $25 USD for this job
User Avatar
A proposal has not yet been provided
$25 USD in 1 day
4.9 (55 reviews)
6.2
6.2
User Avatar
A proposal has not yet been provided
$30 USD in 1 day
5.0 (13 reviews)
4.7
4.7
User Avatar
hi... i can do this. Please let me know to start immediately. i can deliver you on time. Please initiate communication to discuss further. thanks
$25 USD in 1 day
4.6 (21 reviews)
4.5
4.5
User Avatar
Hello, I am experienced and specialized in C and C++ programing. I have taken part in many competitions, including national competition, in which I won 2nd prize. I always work with responsibility and quality. Please contact me for details and time required, I will finish the job within time required. Thank you!
$23 USD in 1 day
4.9 (15 reviews)
3.2
3.2
User Avatar
A proposal has not yet been provided
$40 USD in 1 day
5.0 (5 reviews)
2.2
2.2
User Avatar
I'm an experienced C ++ programmer I want to take this job. I can give examples of my works. This is mainly complex applications from the field of turbine construction. I'm sure you will enjoy dealing with me.
$20 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
A proposal has not yet been provided
$30 USD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
It's like a problem in a programming contest and I have solved a lot of similar problems. I'm quite interested in it.
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
have advanced knowledge of C ++, the project would be a pleasure to do so, it would be a cinch to demonstrate my skills can show a game of monopoly in fact pure c ++ console. if you have any questions please write me a private message. Cheers
$25 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
A proposal has not yet been provided
$15 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Plantation, United States
5.0
69
Payment method verified
Member since Sep 30, 2014

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) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
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.