Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien
logo-home
Solution Manual for An Introduction to Programming with C++ 8th Edition by Diane Zak €17,33   Ajouter au panier

Examen

Solution Manual for An Introduction to Programming with C++ 8th Edition by Diane Zak

 19 vues  1 fois vendu
  • Cours
  • SolutionManual
  • Établissement
  • SolutionManual

Solution Manual for An Introduction to Programming with C++ 8th Edition by Diane Zak

Aperçu 4 sur 87  pages

  • 8 août 2024
  • 87
  • 2024/2025
  • Examen
  • Questions et réponses
  • SolutionManual
  • SolutionManual
avatar-seller
Solution Manual For
An Introduction to Programming with C++ 8th Edition by Diane Zak
Chapter 1-15

Chapter 1
An Introduction to Programming with C++: Eighth Edition
Chapter 1 Answers


Review Questions
1. d sorting
2. c sequence
3. d sequence
4. a an algorithm
5. b repetition
6. c selection
7. b selection
8. a repetition
9. c both repetition and selection
10. b selection

Exercises
1. The answer to this TRY THIS Exercise is located at the end of Chapter 1 in the book.
2. The answer to this TRY THIS Exercise is located at the end of Chapter 1 in the book.
3. repeat for (each customer buying a TV)
enter the original price of the TV
if (the customer is one of the first 10)
calculate the discount by multiplying the original price by 25%
else
calculate the discount by multiplying the original price by 15%
end if
calculate the total due by subtracting the discount from the original price
print a bill showing the original price, discount, and total due
end repeat
4.
1. repeat (4 times)
enter a number
calculate the sum by adding the number to the sum
end repeat
2. calculate the average by dividing the sum by 4
3. display the average
5.
repeat for (each component name on the list)
read the component name from the list
search for the component
if (the component was received)
cross the component name off the list
else
circle the component name on the list
end if

, end repeat

6. Version 1:
repeat for (each customer)
enter the number of tickets
if (the number of tickets is greater than 4)
display the message “You can purchase up to 4 tickets only.”
else
calculate the amount owed by multiplying the number of tickets by $35
display the amount owed
end if
end repeat

Version 2:
repeat for (each customer)
enter the number of tickets
if (the number of tickets is less than or equal to 4)
calculate the amount owed by multiplying the number of tickets by $35
display the amount owed
else
display the message “You can purchase up to 4 tickets only.”
end if
end repeat

7.
1. repeat (6 times)
if (the flower is red)
pick the flower with your right hand
else
pick the flower with your left hand
end if
walk forward one complete step
end repeat
2. walk forward one complete step

8.
repeat (5 times)
enter the employee’s name, hours worked, and pay rate
if (hours worked is less than or equal to 40)
calculate gross pay = hours worked times pay rate
else
calculate regular pay = pay rate times 40
calculate overtime hours = hours worked minus 40
calculate overtime pay = overtime hours * pay rate * 1.5
calculate gross pay = regular pay + overtime pay
end if
print the employee’s name and gross pay
end repeat

9. repeat (for each employee)

, enter the employee’s payment schedule and annual salary
if (the employee’s payment schedule is weekly)
calculate gross pay = annual salary / 52
else
calculate gross pay = annual salary / 26
end if
display the gross pay
end repeat

10.
1. multiply 7 by 5, giving a product of 35
2. divide 20 by 2, giving a quotient of 10
3. multiply 4 by 2, giving a product of 8
4. subtract the result of step 2 (10) from the result of step 1 (35), giving
a difference of 25
5. add the result of step 4 (25) to the result of step 3 (8), giving a sum of 33

11.
1. enter Store A’s price and Store B’s price
2. calculate the cost at Store A by dividing Store A’s price by 2 and then
adding the result to Store A’s price
3. calculate the cost at Store B by multiplying Store B’s price by 2
4. if (the cost at Store A is less than or equal to the cost at Store B)
display the message “Buy at store A”
else
display the message “Buy at store B”
end if

12.
1. repeat (3 times)
walk forward one complete step
end repeat
2. turn left 90 degrees
3. repeat (2 times)
walk forward one complete step
end repeat
4. turn right 90 degrees
5. repeat (3 times)
walk forward one complete step
end repeat
6. turn left 90 degrees
7. walk forward one complete step
8. turn right 90 degrees
9. repeat (4 times)
walk forward one complete step
end repeat
10. repeat (2 times)
turn right 90 degrees
end repeat
11. sit down

, 13.
1. walk into the maze
2. turn left 90 degrees
3. repeat until (you are directly in front of a wall)
walk forward one complete step
end repeat
4. turn right 90 degrees
5. repeat until (you are directly in front of a wall)
walk forward one complete step
end repeat
6. turn right 90 degrees
7. repeat until (you are directly in front of a wall)
walk forward one complete step
end repeat
8. turn left 90 degrees
9. repeat until (you are directly in front of a wall)
walk forward one complete step
end repeat
10. turn left 90 degrees
11. repeat until (you are directly in front of a wall)
walk forward one complete step
end repeat
12. turn right 90 degrees
13. repeat until (you are directly in front of a wall)
walk forward one complete step
end repeat
14. turn left 90 degrees
15. repeat until (you are directly in front of a wall)
walk forward one complete step
end repeat
16. turn right 90 degrees
17. repeat until (you are out of the maze)
walk forward one complete step
end repeat




An Introduction to Programming with C++: Eighth Edition
Chapter 2 Answers


Review Questions
11. b Analyze the problem
12. b output

Les avantages d'acheter des résumés chez Stuvia:

Qualité garantie par les avis des clients

Qualité garantie par les avis des clients

Les clients de Stuvia ont évalués plus de 700 000 résumés. C'est comme ça que vous savez que vous achetez les meilleurs documents.

L’achat facile et rapide

L’achat facile et rapide

Vous pouvez payer rapidement avec iDeal, carte de crédit ou Stuvia-crédit pour les résumés. Il n'y a pas d'adhésion nécessaire.

Focus sur l’essentiel

Focus sur l’essentiel

Vos camarades écrivent eux-mêmes les notes d’étude, c’est pourquoi les documents sont toujours fiables et à jour. Cela garantit que vous arrivez rapidement au coeur du matériel.

Foire aux questions

Qu'est-ce que j'obtiens en achetant ce document ?

Vous obtenez un PDF, disponible immédiatement après votre achat. Le document acheté est accessible à tout moment, n'importe où et indéfiniment via votre profil.

Garantie de remboursement : comment ça marche ?

Notre garantie de satisfaction garantit que vous trouverez toujours un document d'étude qui vous convient. Vous remplissez un formulaire et notre équipe du service client s'occupe du reste.

Auprès de qui est-ce que j'achète ce résumé ?

Stuvia est une place de marché. Alors, vous n'achetez donc pas ce document chez nous, mais auprès du vendeur solutions. Stuvia facilite les paiements au vendeur.

Est-ce que j'aurai un abonnement?

Non, vous n'achetez ce résumé que pour €17,33. Vous n'êtes lié à rien après votre achat.

Peut-on faire confiance à Stuvia ?

4.6 étoiles sur Google & Trustpilot (+1000 avis)

76710 résumés ont été vendus ces 30 derniers jours

Fondée en 2010, la référence pour acheter des résumés depuis déjà 14 ans

Commencez à vendre!
€17,33  1x  vendu
  • (0)
  Ajouter