Concept explainers
The variable j starts with the value 10.
The variable k starts with the value 2.
The variable m starts with the value 4.
Store the value of j times k in j.
Store the value of k times m in m.
Add j and m, and store the result in k.
Display the value in k on the screen.
Want to see the full answer?
Check out a sample textbook solutionChapter 1 Solutions
Starting Out With C++: Early Objects, Student Value Edition & Myprogramminglab With Pearson Etext -- Standalone Access Card Package, 9/e
Additional Engineering Textbook Solutions
Web Development and Design Foundations with HTML5 (8th Edition)
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
C How to Program (8th Edition)
Starting out with Visual C# (4th Edition)
Starting Out with Python (4th Edition)
- 5. The variable j starts with the value 10. The variable k starts with the value 2. The variable l starts with the value 4. Store the value of j times k in j. Store the value of k times l in l. Add j and l, and store the result in k. Display the value in k on the screen. 6. The variable a starts with the value 1. The variable b starts with the value 10. The variable c starts with the value 100. The variable x starts with the value 0. Store the value of c times 3 in x. Add the value of b times 6 to the value already in x. Add the value of a times 5 to the value already in x. Display the value in x on the screen. 7. area = width × length. Display “What is the room’s width?”. Input width. Display “What is the room’s length?”. Input length. Display area.arrow_forwardPretend that you have just opened a new savings account that earns 4 percent interest per year. The interest that you earn is paid at the end of the year and is added to the balance of the savings account. Write a program that begins by reading the amount of money deposited into the account from the user.Then your program should compute and display the amount in the savings account after 1, 2, and 3years. Display each amount so that it is rounded to 2 decimal places.arrow_forwardare programs expressed as English statements. What would each displayon the screen if they were actual programs? The variable a starts with the value 1.The variable b starts with the value 10.The variable c starts with the value 100.The variable x starts with the value 0.Store the value of c times 3 in x.Add the value of b times 6 to the value already in x.Add the value of a times 5 to the value already in x.Display the value in x on the screen.arrow_forward
- ((PYTHON)) Q1- Ask the user to write a number 8 times. Find the sum and the average of all those numbers then display for the user the answer of both the sum and the average. Q2- Ask the user to guess what your favorite color is. If he does not answer correctly, ask him if he wants to try again. If he does not want to try again, display for him the correct answer.arrow_forwardIm kind of lost. Could someone help me please? Draw the hierarchy chart and then plan the logic for a program that calculates a person's body mass index (BMI). BMI is a statistical measure that compares a person's weight and height. The program uses three modules. The first prompts a user for and accepts the user's height in inches. The second module accepts the user's weight in pounds and converts the user's height to meters and weight to kilograms. Then, it calculates BMI as weight in kilograms divided by height in meters squared and displays the results. There are 2.54 centimeters in an inch, 100 centimeters in a meter, 453.59 grams in a pound, and 1,000 grams in a kilogram. Use named constants whenever you think they are appropriate. The last module displays the message End of job.arrow_forward24. A piece of wire is to be bent in the form of a rectangle to put around a picture frame. The length of the picture frame is 1.5 times the width. Write a program that prompts the user to input the length of the wire and outputs the length and width of the picture frame.arrow_forward
- Open notes and open book. Suppose you have a certain amount of money in a savings account that earnscompound monthly interest, and you want to calculate the amount that you willhave after a specific number of months. The formula is as follows:f = p * (1 + i)^t• f is the future value of the account after the specified time period.• p is the present value of the account.• i is the monthly interest rate.• t is the number of months.Write a program that takes the account's present value, monthly interest rate,and the number of months that the money will be left in the account as threeinputs from the user. The program should pass these values to a function thatreturns the future value of the account after the specified number of months.the program should print the account's future value.arrow_forwardTrue or false _______ 9. The ratio 3 : 5 is less than the ratio 2 : 11. _______ 10. To express decimal to percent we simply move the decimal point two places to the right and a x the percent sign.arrow_forwardTrue or False: The expression 6!0! equals 0.arrow_forward
- Y = Math.sqrt(4) * Math.abs(4)The value of Y is ______ a. 8 b. -16 c. 16 d. -8arrow_forward1___5.Print the numbers from 1 to n, but for multiples of 3, print "Fizz" instead of the number, and for multiples of 5, print "Buzz". For numbers which are multiples of both 3 and 5, print "FizzBuzz"..arrow_forwardFill in the blank question: Q. M3G is also known as _______________ Graphics.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrEnhanced Discovering Computers 2017 (Shelly Cashm...Computer ScienceISBN:9781305657458Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. CampbellPublisher:Cengage LearningC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning