Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 3-ISBN-10 (in class) CSCI 251 Problem Statement An ISBN (International Standard Book Number) consists of 10 digits: d,d, ds ds d7dad, do. The last

image text in transcribed
image text in transcribed
Lab 3-ISBN-10 (in class) CSCI 251 Problem Statement An ISBN (International Standard Book Number) consists of 10 digits: d,d, ds ds d7dad, do. The last digit dio is a checksum, which is calculated from the other nine digits 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 (i.e., 1 through 9) is the same number Write a program that prompts the user to enter the first 9 digits and then displays the 10-digit ISBN (including leading zeroes). Input Data di. da, ds, da, ds, ds, dz, ds, and d . Output Data The 10 digit ISBN, correctly formatted as d-deds-ddsded deds-dio Before You Begin 1. Start MATLAB (Start> All Programs>MATLAB R2017a) and change your Current Folder to the location of your hard drive (e.g., E:/MATLAB programs/) If you forget to do this, your MATLAB programs will not be accessible whenever the computers in this lab are cleared, which is throughout the semester 2. In the Command Window, type edit isbn10 yourLastName.m MATLAB should prompt that the file does not currently exist, select OK so MATLAB will create the file in your Current Folder Starting File Include header comments (i.e., at the beginning of your file) formatted as shown below. Your electronic submission of the program file will represent your endorsement of the Honor Code Statement. % Course: CSCI 251, Section X % Student Name: Jane Doe % Student ID: 12345678 % Lab 3 in dass % Due Date: % in keeping with the Honor Code of UM. I have neither % given nor received assistance from anyone other than the instructor. % Program Description: Algorithm 1. clc clear Begin your program with to clear the Command Window and Workspace windows, respectively Prompt (ask) the user for each of the first 9 ISBN digits-d,, da ds d4, ds, d6, d d, and d9. using Matlab's input command (9 inputs). Calculate the last digit, dio, by calculating the modulus: 2. 3

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_2

Step: 3

blur-text-image_3

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 Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

Find the derivative of y= cos cos (x + 2x)

Answered: 1 week ago