I have finished part of the homework but it couldn’t pass and it’ll due in 5 hoursCSE 2133 – Lab 1
Part A
You will write an interactive program (name it lab1a.cob) that will prompt the user for a 4 digit
(unsigned) number. The program will repeat this until the user enters a 0. Once a 0 is entered by
the user the program will stop executing; this program only performs a single session.
When the user enters a 0, the program will show the last number the user entered. Note that the
0 is not to be treated as the last number entered; it is strictly a sentinel value, not data.
Make sure all instructions and outputs are clear and meaningful.
Sample session:
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
a
a
a
a
a
a
a
a
4-digit
4-digit
4-digit
4-digit
4-digit
4-digit
4-digit
4-digit
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
number
number
number
number
number
number
number
number
(0
(0
(0
(0
(0
(0
(0
(0
to
to
to
to
to
to
to
to
stop):
stop):
stop):
stop):
stop):
stop):
stop):
stop):
12
8
9999
5
270
1
9876
0
The last number entered: 9876
Part B
This will be a modification of lab1a. This program will be named lab1b.cob and will allow for
multiple sessions in a run.
The program will ask the user if there is to be another session. An input of “N” to this prompt
will stop the program. Any other input value can be treated as if it was a “Y” and will cause the
program to initiate a new session identical to that in part A above. Once the session ends, it will
then ask the user if there is to be another session.
Sample run:
Another Session (Y/N)? Y
Enter
Enter
Enter
Enter
Enter
Enter
Enter
Enter
a
a
a
a
a
a
a
a
4-digit
4-digit
4-digit
4-digit
4-digit
4-digit
4-digit
4-digit
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
unsigned
number
number
number
number
number
number
number
number
The last number entered: 9876
(0
(0
(0
(0
(0
(0
(0
(0
to
to
to
to
to
to
to
to
stop):
stop):
stop):
stop):
stop):
stop):
stop):
stop):
12
8
9999
5
270
1
9876
0
Another Session (Y/N)? Y
Enter
Enter
Enter
Enter
a
a
a
a
4-digit
4-digit
4-digit
4-digit
unsigned
unsigned
unsigned
unsigned
number
number
number
number
(0
(0
(0
(0
to
to
to
to
stop):
stop):
stop):
stop):
18
19
20
0
The last number entered: 0020
Another Session (Y/N)? N
Part C
This will be a modification of lab1a. This program will be named lab1c.cob and will be a batch
version of lab1a.cob. The input file will be named “lab1c-in.dat” and will be located in the same
directory as the lab1c executable (so do not specify a path for the file in the Select statement).
Each record of the file will contain a single 4-digit unsigned number. This program will display
to the screen the last number in the file.
There is no sentinel value within the file; each record is to be treated as data, even if the
value on the record is 0. Also, each file represents a single session.
Bonus Points
Bonus points are possible for each of the three parts if the programs can also show the first
number entered for each session, in addition to the last number for each session. Note that 0 is
not to be treated as the first number entered; it is strictly a sentinel value, not data.

Purchase answer to see full
attachment




Why Choose Us

  • 100% non-plagiarized Papers
  • 24/7 /365 Service Available
  • Affordable Prices
  • Any Paper, Urgency, and Subject
  • Will complete your papers in 6 hours
  • On-time Delivery
  • Money-back and Privacy guarantees
  • Unlimited Amendments upon request
  • Satisfaction guarantee

How it Works

  • Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
  • Fill in your paper’s requirements in the "PAPER DETAILS" section.
  • Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
  • Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
  • From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.