# (Solved Homework): kD ▼ 05 ELET 2300-HW01 [Compatibility a Design Layout References Mailings Review al 12A A Hwo1 Due Sunday Sep 17, by 11:59 pm Submit your solution on blackboard l…

Numbers 1-3. Please do not post without finishing all questions otherwise I will not give a thumbs up.

kD ▼ 05 ELET 2300-HW01 [Compatibility a Design Layout References Mailings Review al 12A A Hwo1 Due Sunday Sep 17, by 11:59 pm Submit your solution on blackboard learn. You will need to submit 3 files: 1, A Microsoft word document with you answers to Q1-Q6. 2. Your program for Q6 as a text file, named: hw1q6.cpp 3. Your program for Q7 as a text file, named: hw1q7.cpp Note: For Q6 and Q7 DO NOT Submit you Visual Studio 2015 project/solution files. You need to submit only the program as a text file with the extension Write an algorithm (list the steps) to swap the contents of two numbers. For example, if number1 = 10 and number2-20, after the swap, number1 = 20 and number2:10. You do not have to write a program, just the algorithm. Use the pseudocode method ie write the ep procedure using ecolish phrases, Do not use the flowchart method. 1. 2. AC+ program is required that calculates the amount, in dollars, contained in a pigaybank. The piggybank contains, quarters, dimes, nickels, and pennies a. For this programming problem, how many outputs are required? b. How many inputs does this problem have? c. Write an algorithm (psuedocode format and not flowchart) for converting the input items into output items. d. Test the algorithm written for Exercise 1c using the following sample data: quarters 17, dimes 24, nickels 16, and pennies 12 3 For the following algebraic expressions, write the corresponding C expressions: a. (2×3) (4)(5) 6+18 b. 2 Determine the values of the following numerical expressions: a. 3+4 6 4. □ Focus 529 Words

1. Algorithm to swap the contents of two numbers

Don't use plagiarized sources. Get Your Custom Essay on
(Solved Homework): kD ▼ 05 ELET 2300-HW01 [Compatibility a Design Layout References Mailings Review al 12A A Hwo1 Due Sunday Sep 17, by 11:59 pm Submit your solution on blackboard l…
Get an essay WRITTEN FOR YOU, Plagiarism free, and by an EXPERT!

Algorithm:

Step 1: Start

Step 2: Read number1 and number 2

Step 3: Set temp = number1

Step 4: Set number1 = number 2

Step 5: Set number2 = temp

Step 5: Print number1 and number2

Step 6: Stop

2. Amount in PiggyBank

2 a. For this programming problem , how many outputs are required?

Answer: As per the question we will be given a certain amount of quarters, dimes, nickels and pennies and we need to calculate the total amount in dollars hence the program has only one output.

2 b. How many inputs does this problem have?

Answer: As per the question the PiggyBank contains quarters, dimes, nickels and pennies and hence the program requires 4 inputs.

2 c. Algorithm:

Step 1: Start

Step 2: Set totalDollars = 0

Step 7: Compute totalDollars = totalDollars + (quarters * 0.25)

Step 8: Compute totalDollars = totalDollars + (dimes * 0.10)

Step 9: Compute totalDollars = totalDollars + (nickels * 0.05)

Step 10: Compute totalDollars = totalDollars + (pennies * 0.01)

Step 11: Print totalDollars

Step 12: Stop

2 d. Test the algorithm for 17 quarters, 24 dimes, 16 nickels and 12 pennies

totalDollars =0

quarters = 17

dimes = 24

nickels = 16

pennies = 12

Now, totalDollars = 0 + (quarters * 0.25)

=> totalDollars = 17 * 0.25

=> totalDollars = 4.25

Now, totalDollars = totalDollars + (dimes * 0.10)

=> totalDollars = 4.25 + (24 * 0.10)

=> totalDollars   = 4.25 + 2.4

=> totalDollars   = 6.65

Now, totalDollars = totalDollars + (nickels * 0.05)

=> totalDollars = 6.65 + (16 * 0.05)

=> totalDollars   = 6.65 + 0.8

=> totalDollars   = 7.45

Now, totalDollars = totalDollars + (pennies * 0.01)

=> totalDollars   = 7.45 + (12 * 0.01)

=> totalDollars    = 7.45 + 0.12

=> totalDollars = 7.57

Hence we have a total of 7.57 dollars for the given input.

3. For the following algebraic expressions, write the corresponding c++ statements

a. (2)(3) + (4)(5)

The equivalent c++ statement is

(2 * 3) + (4 * 5)

b. 6 + 18

2

The equivalent c++ statement is

(6 + 18) / 2

Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

## Calculate the price of your order

Total price:
\$0.00

How it works?

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

## Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.