Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help ASAP | .11 T-Mobile 9:07 PM Lab Assignment 2-5BN10.pdf ] Open with Print 1 of 2 Lab Assignment 2-ISBN-10 CSCI 251 Problem Statement

Need help ASAP image text in transcribed
image text in transcribed
| .11 T-Mobile 9:07 PM Lab Assignment 2-5BN10.pdf ] Open with Print 1 of 2 Lab Assignment 2-ISBN-10 CSCI 251 Problem Statement An ISBN (internatonal Standard Book Number) consists of 10 digits: d.d, d. d, ds& d d.d The last digit dia is a checksum, which is calculated from the ofher nine digts using the following formula: where mod is short for modulus. If the checksum is 10, then the last digit is denoted X according to the ISBN convention. Any other number ie 1 through 9) is the same number Write a program tht prompts the user to enber the first 9 digits of an ISBN and then displays the 10-dig ISBN (including leading zeres) Input Data nine digits of ISBN, character string Output Data The 10 digit ISBN. correctly formatted as d,-d,d)" dddd da," dre Before You Begin 1 Sart MATLAB (Start> All Programs> MATLAB R2014a) and change your Current Folder to the location of your hard drive (eg,K MATLAB programs If you forget to do this your MATLAB programs will not be accessble whenever the computers in this lab are cleared. which is throughout the semester In the Command Window, type edit isbn10m MATLAB should prompt that the file does not currently exist, select OK so MATLAB will create the file in your Cument Folder 2. Starting File Include header comments fe at the beginning of your tle) formatted as show below. Your electronic submission of the program fle will represent your endorsement of the Honor Code Statement % CSCI 251, Section X % Student ID 12345678 %Lab Alignment 2 %b, keeping with te Honor Code ofte School of Engreenrg. . have neither 1. Begin your program with cle 2 Prompt (ask) the user for the first 9 1S8N digits, using Matiab's input command Note hat this is 3. Determine the length entered is 9 usng anstatement and the character length fun tion. If 4 If the length is exacity 9, parse off each character into nine variables. For example to clearCommand Window and workspace windows, respectively just one prompt (hint use a character string) the input anything other than length 9. output an error and your program is done d9 _ str2nurmisbn(9)) w parse the iaat dige convert to a numeric val .. and assign that 5. Caloulate the last digit, do by determining the modulus: Note the above eaation does not use cormect Maiab syntax Type help mod t

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

Question Can a self-employed person adopt a profit sharing plan?

Answered: 1 week ago