Prompt user to enter two numbers on a single line separated

Assignment Help Programming Languages
Reference no: EM131477478

Assignment

Purpose

This assignment is designed to familiarize you with the basics of looping.

Requirements

This assignment consists of five major requirements.
1) Developing a solution to the problem below.
2) Ensuring that it assembles and runs correctly using the tools on edoras.
3) Documenting your solutions correctly.
4) Organizing your handin directory and submissions correctly.
5) You must bring in a hardcopy of the rubric to class on the day the assignment is due. If the rubric is late, the assignment is late.

Problem

1) First, the program will print the programming assignment number, your name, and your class account, all on one line. Then your program will prompt the user to enter two numbers on a single line separated by a space. Your program will then validate that the two numbers input
fufill the following requirements:

a. There is nothing typed on the input line except numbers and a single space. If there is anything other than numbers and a single space, reject the input.

b. Each number must be at most 5 digits long and at least 2 digits long. Any other length input for each number should reject the input.

c. Each number must be in the range 25 - 65250 inclusive. If they are not reject the input.

Once all of these input verifications are satisfied your program will output three pieces of information:

a. The number of bits required to store the first number as a 2's compliment number

b. The number of bits required to store the second number as a 2's compliment number

c. The number of bits required such that adding the two numbers together would not result in overflow.

For example:
27 38
First number requires 6 bits.
Second number requires 7 bits.
No-overflow addition requires 7 bits.

2) You must ensure that your assembler can be assembled and run on edoras using the tools ppasm and bsvc. You may develop your solution on any machine you desire, as long as the final solution works on edoras.

3) Your solution must have a complete comment header as is detailed in your template.s file. During runtime, your solution to section 1 must output a correct title string as the first line printed. It should be in this format:

Program #2, Student Name, mascXXXX

4) You must place a copy of your solution inside a folder named handin in your home directory.

Your file MUST be named prog3.s and must not be modified after the turn in time. The modified timestamp for the file prog3.s in your handin folder will be used as the submission time. If it is after the due date, it will be counted as late. DO NOT turn in any compiled files.

Late Policy

Late programs will be accepted with a penalty of 5% per day for seven days after due date.

Cheating Policy

There is a zero tolerance policy on cheating in this course. You are expected to complete all programming assignments on your own. Collaboration with other students in the course is not permitted. You may discuss ideas or solutions in general terms with other students, but you must not exchange code. (Remember that you can get help from me. This is not cheating, but is in fact encouraged.) I will examine your code carefully. Anyone caught cheating on a programming assignment or on an exam will receive an "F" in the course, and a referral to Judicial Procedures.

Attachment:- Pic.rar

Reference no: EM131477478

Questions Cloud

An organization when writing a program evaluation report : As a program evaluator, how would you achieve maximum readability and potential for change when writing a program evaluation report? Defend your ideas.
Topic-opportunities making business with mobile computing : For this assessment, students are expected to demonstrate their understanding of the extant, academic literature related to an approved, business topic
What are three basic sources of return : Which sources of return are included in calculating the current yield, yield to maturity, and yield to call?
Stress reactions of world wars i and ii combat : Comparing and contrasting stress reactions of World Wars I and II combat with modern combat research.
Prompt user to enter two numbers on a single line separated : Then your program will prompt the user to enter two numbers on a single line separated by a space. Your program will then validate that the two numbers input .
Why is preferred stock a hybrid security : For bonds selling at a premium, what is the relationship between the yield to call and the yield to maturity?
What are the components in valuing a preferred stock : What is the importance of a cumulative dividend feature to preferred stockholders?
Explain the benefits of the analysis type : Explain how the qualitative data would be analyzed in order to identify trends and patterns in the qualitative responses collected.
How does majority voting differ from cumulative voting : How does majority voting differ from cumulative voting? Which method would tend to favor minority stockholders in electing members to the board of directors?

Reviews

Write a Review

Programming Languages Questions & Answers

  Do ides help or hinder newbies learning to code

Do IDEs help or hinder newbies learning to code? Should they first be exposed to a text editor without a lot of fancy features to learn how to set things up

  Write program to compute contestant-s score

Performer's final score is determined by dropping highest and lowest score received, then averaging remaining scores. Write a program which uses this method to compute a contestant's score.

  Analysis of a group of weight measurements

Prepare a program that takes an input weight and puts the correct value - An analysis of a group of weight measurements involves converting a weight value into an integer category number that is determined as given:

  Create an app to display output from the google soap api

The documentation for the Google SOAP Search API remains at the the following URL: http://code.google.com/apis/soapsearch/. Therefore, please visit that URL in order to read about how to implement the Google SOAP Search API.

  Prepare clear button which will clear result text box

Make the compute button the Accept button. Prepare Clear button which will clear result text box and reset all text boxes, 4. controls, and internal variables used.

  Write the program to model simple calculator

Write the program to model the simple calculator. Each data line must consist of next operation to be performed from list below and right operand.

  Identify all the pure-strategy nash equilibria of game

Identify all of the pure-strategy Nash Equilibria of this game. Identify at least one mixed-strategy Nash Equilibrium, and show that it is a Nash Equilibrium.

  Write a program that will help you make a decision

Write a program that will help you make a decision. Calculate $10/hr earnings for a user specified number of hours, calculate the earnings for a given number of hours if you chose the $.10 /hour that doubles each hour or Exit.

  Grade book program

Grade Book Program

  Provide an equivalent iterative implementation

Write a recursive method that given n, computes the nth term of that sequence. Also provide an equivalent iterative implementation. How do the two implementations compare?

  Designing a mobile computing application

As using the GPS is battery consuming, the app should also be sensitive to battery levels and perhaps stop GPS based tracking or disallow tracking or warn the user if battery levels are too low - When a tracked path is saved, LTUPersonalLogger shou..

  Write a prolog program that finds the ast item in a list

Write a Prolog program that finds the ast item in a list. Add a test query.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd