Related questions
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
gallonsvariable. c. Prompt the user to enter miles. d. Read the input and store it in themilesvariable.Calculate the gas mileage: a. Divide the
milesbygallonsand store the result in thegasMileagevariable.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 nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images
- COMPUTER FUNDAMENTALS AND PROGRAMMING 2 USING JAVA CODES Input the temperature, and determine whether or not it is within the typical range for that temperature.arrow_forwardOne of the benefits of computers is that they can be programmed to do a specific task. Which of the following statements is correct?arrow_forwardCOMPUTER FUNDAMENTALS AND PROGRAMMING 2 USING JAVA CODES Input the temperature, and determine whether or not it is within the typical range for that temperature.arrow_forward
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education