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
Write in Assembly Language
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
“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:
- Start
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 themiles
variable.Calculate the gas mileage: a. Divide the
miles
bygallons
and store the result in thegasMileage
variable.Display the gas mileage: a. Display the text "The car's gas mileage is: ". b. Display the value of
gasMileage
.Terminate the program: a. Terminate the program.
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.
- Define
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images