Post a New Question

Computer Science

posted by .

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

  • Computer Science -

    Which assembler are you using? Assemblers are very much machine dependent, and the number of instructions available are different. For example, the assembler MARIE does not have rotate instructions. Also the mnemonics could be different.

    You may want to concentrate on one (perhaps the easiest) problem, work out a draft and post if you have difficulties. The remaining ones can then be solved in a similar way.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. computer science /use java language

    write the program that inputs a string representing a binary number(0s and 1s). First, your program should veerify that it is indeed a binary number, that is, the number contains only 0s and 1s . if that is not the case, your program …
  2. computer programming

    Write a program that simulates the dial of a phone number. The program will input a phone number and the program will acknowledge the call by either writing an error message or the 8 digit phone number to the console window. The phone …
  3. Computer Science

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

    After writing the program of Exercise 17.7, write a simple program to create some test data for checking out the program. Use the following sample account data: Master file Account number Name Balance 100 Alan Jones 348.17 300 Mary …
  5. Programming

    Write a pseudocode program that asks the user for an integer between 1 and 12. The program is to calculate the times table for that number. So for example, if the user enters a 2, then the program has to calculate 2x1 and display the …
  6. computer science

    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 …
  7. programming MIPS ask 3

    Write a MIPS assembly language program for the following for loop: Pseudocode: int x; # for(x=10; x>0; x--){ # printf("x=%d", 4x); #} In the program use the slt or slti instruction and sll
  8. c programming

    a student designed a program to accept the age of an employee and then compute the employees retirement year and display the same in a statement on the screen required. a) write out the pseudo-code for the program above b) write the …
  9. computer programing

    You are to write a short C program. The program will input two numbers: 1) number of miles to ship a package, 2) and the weight of the package You are to computer the price to ship the package. The formula is as follows. If the weight …
  10. computer programing

    okay I need a little help here on next program this what it say for first one which I have done. Create a counting program that counts backward from 100 to 1 in increments of 10. #include < stdio.h > int main () { Int i; while …

More Similar Questions

Post a New Question