Concept explainers
To write:A Basic Math program to print a chart showing a combination of nickels and dimes and finding the total value.
Answer to Problem 1CE
1 2 3 4 5 6 7 8 9 10 11 12
11 10 9 8 7 6 5 4 3 2 1 0
1 11 2 10 3 9 4 8 5 7 6 6 7 5 8 4 9 3 10 2 11 1 12 0
Explanation of Solution
Given information: As given in the question: Jane has in total 12 coins, let the nickels be ‘s’ and dimes be ‘t’.
Concept Used:
A FOR……. NEXT loop in BASIC.
Calculation:
We consecutively assume initially the coins to be a combination of nickels to be ‘s’ and dimes to be ‘t’.We input variables n, d, s and t to be zero. Further we use three FOR……. NEXT loops to show combination of nickels and dimes along with the total value. The FOR …….loop works to repeat values of coins from 1 to 12 by repeating the combination of nickels and vice versa for dimes consecutively.
PROGRAM CLS
INPUT
INPUT
FOR
NEXT i
PRINT s
END
FOR j=11to 1 [Finds the combination of dimes]
NEXT j
PRINT t
END
FOR
NEXT k
PRINT s
PRINT t
PRINT k
END
Chapter 3 Solutions
Algebra: Structure And Method, Book 1
Additional Math Textbook Solutions
A Problem Solving Approach To Mathematics For Elementary School Teachers (13th Edition)
Elementary Statistics: Picturing the World (7th Edition)
University Calculus: Early Transcendentals (4th Edition)
Elementary Statistics
Algebra and Trigonometry (6th Edition)
- Algebra and Trigonometry (6th Edition)AlgebraISBN:9780134463216Author:Robert F. BlitzerPublisher:PEARSONContemporary Abstract AlgebraAlgebraISBN:9781305657960Author:Joseph GallianPublisher:Cengage LearningLinear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage Learning
- Algebra And Trigonometry (11th Edition)AlgebraISBN:9780135163078Author:Michael SullivanPublisher:PEARSONIntroduction to Linear Algebra, Fifth EditionAlgebraISBN:9780980232776Author:Gilbert StrangPublisher:Wellesley-Cambridge PressCollege Algebra (Collegiate Math)AlgebraISBN:9780077836344Author:Julie Miller, Donna GerkenPublisher:McGraw-Hill Education