Write in Assembly Language Programming show code and submit output screenshot make it run with visual studio and other famous compilers. Q) write the programs in Assembly Language A) Write a program that calculates a car's gas mileage. The program should ask the user to enter the number of gallons of gas the car can hold and the number of miles it can be driven on a full tank. It should then calculate and display the number of miles per gallon the car gets. B. Write a program that asks the user to enter their monthly costs for each of the following housing-related expenses: rent or mortgage payment utilities phones cable The program should then display the total monthly cost of these expenses and the total annual cost of these expenses. C. A bag of cookies holds 30 cookies. The calorie information on the bag claims that there are 10 "servings" in the bag and that a serving equals 240 calories. Write a program that asks the user to input how many cookies they actually ate and then reports how many total calories were consumed. Note: you need to submit the source code and the output of the program

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter3: Input/output
Section: Chapter Questions
Problem 4PE: 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and...
icon
Related questions
Question

Write in Assembly Language Programming show code and submit output screenshot make it run with visual studio and other famous compilers.

Q) write the programs in Assembly Language

A) Write a program that calculates a car's gas mileage. The program should ask the user to
enter the number of gallons of gas the car can hold and the number of miles it can be
driven on a full tank. It should then calculate and display the number of miles per gallon
the car gets.
B. Write a program that asks the user to enter their monthly costs for each of the following
housing-related expenses: rent or mortgage payment utilities phones cable The program
should then display the total monthly cost of these expenses and the total annual cost of
these expenses.
C. A bag of cookies holds 30 cookies. The calorie information on the bag claims that there
are 10 "servings" in the bag and that a serving equals 240 calories. Write a program that
asks the user to input how many cookies they actually ate and then reports how many
total calories were consumed.
Note: you need to submit the source code and the output of the program

Expert Solution
Step 1: Algorithm

“Since you have posted multiple questions, we will provide the solution only to the first question as per our Q&A guidelines. Please repost the remaining questions separately.”

Algorithm:

  1. Start
  2. Ask the user to input the car's parameters:                                                                                                        a. Prompt the user to enter gallons of gas.                                                                                                        b. Read the input and store it in the gallons variable.                                                                                      c. Prompt the user to enter miles.                                                                                                                      d. Read the input and store it in the miles variable.

  3. Calculate the gas mileage: a. Divide the miles by gallons and store the result in the gasMileage variable.

  4. Display the gas mileage: a. Display the text "The car's gas mileage is: ". b. Display the value of gasMileage.

  5. Terminate the program: a. Terminate the program.

  6. Define data:

    • Define gasMileage,,,gallons,, we will provide the solution only to the first question as per our Q&A guidelines. Please repost the remaining questions separately.
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage