Wednesday
July 23, 2014

Homework Help: Computer Science

Posted by Ashley on Wednesday, October 13, 2010 at 12:21am.

1.Write an Assembly program that reads in a number of cents. The program will write out the number of dollars and cents separately.

Sample Run:
? 324
3
24


2. Write an Assembly program to read three numbers in from the user, and output BOTH the sum and the product of the three numbers.

Sample Run:
? 2
? 3
? 4
9
24


3. Write an Assembly program to determine the cost for a group to attend a movie. Tickets are $6 for children and $8 for adults. Read in the number of children and the number of adults, and display the total movie cost.
Sample Run:
? 2
? 1
20


4. Write an Assembly program to compute a person's gas mileage. Prompt for the beginning mileage, ending mileage, and the number of gallons (to the nearest tenth) it took to fill the car. Compute the gas mileage (whole miles per gallon).
Sample Run:
? 32000
? 32250
? 10
25


5. Write an Assembly program to determine the correct admission price to a movie. The price of admission to a movie is $7 for kids (under 12) and $9 for adults. Display the correct admission fee after the user gives you the age for one person.
Sample Run #1:
? 21
9
Sample Run #2:
? 11
7


6. Write an Assembly program to determine the price of a car rental. The car being rented costs $45 per day and frequent renters get a $15 discount on the total bill. Get as input, the number of days rented and whether the user is part of the frequent renter program (have user enter 1 if they ARE a frequent renter and 0 otherwise). Display the total cost to rent the car.
Sample Run #1:
? 4
? 0
180
Sample Run #2:
? 3
? 1
120


7. Write an Assembly program to output a list of number. Read from the user a starting value and an ending value. Your program should output all integers from the starting value through the ending value.
Sample Run:
? 5
? 8
5
6
7
8

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Computer Science - Write an Assembly program that reads in a number of cents. ...
computer science - Write an Assembly program to determine the price of a car ...
computer science - my code works in c++ so the logical I am getting error must ...
computer science /use java language - write the program that inputs a string ...
computer programming - Write a program that simulates the dial of a phone number...
Computer - After writing the program of Exercise 17.7, write a simple program to...
programming 2 - Write a program that inputs a word representing a binary number...
Computer Science - The Daily Gazette accepts classified ads in several ...
programming logic and design - The Daily Gazette accepts classified ads in ...
computer science - How would you write this program? We are using Java in ...

Search
Members