Expert answer:C++ simple coding. see attachment for details.

Answer & Explanation:homework 4.pdf
homework_4.pdf

Unformatted Attachment Preview

Computer Science 120
Homework 4 (3 points)
Due: 2015-10-18
Given:
int main(int argc, char **argv)
{
string words;
short number, hundreds, tens, ones;
hundreds = tens = ones = -1;
number = atoi(argv[1]);
if(number > 999 || number < 0) { cerr << "Not a positive three-digit number!" << endl; return 1; } if(number == 0) { cout << "zero" << endl; return 0; } Deliverables: main.cpp Requirements: Write a program that converts a two-digit integer into words. • First, change the supplied code to apply to two-digit numbers, since this homework was originally going to be done with three digits. • Write switch-cases to convert a number into words (45 → fourty-five). • You may use no more than two if statements. (Or none. There are a few different ways to do this.) • NOTICE that you do not have to use cin to get the number from the user. It's taken as an argument when you call the program, like numconvert.exe 45 . (atoi(argv[1]) is taking the number (taken as a c-string from the argument array) into an integer.) Notes: • Notice that the digit places are -1, which makes comparing easy, since you will only be using positive numbers anyway. • What easy math function can separate a number into its separate digits? (Same one that can be used to distinguish between odds and evens.) • Remind me to show you how to pass arguments to the executable in CodeLite so that you don't have to switch to a terminal to do it. You can simply cheat, and make number equal some number for now. ... Purchase answer to see full attachment

How it works

  1. Paste your instructions in the instructions box. You can also attach an instructions file
  2. Select the writer category, deadline, education level and review the instructions 
  3. Make a payment for the order to be assignment to a writer
  4.  Download the paper after the writer uploads it 

Will the writer plagiarize my essay?

You will get a plagiarism-free paper and you can get an originality report upon request.

Is this service safe?

All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 20% with the discount code ESSAYHELP