Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Introduction to Matlab Spring 2018 HW 9 Due on the week of March 14, 2018 Section: Name: Write a function named write_two_digits that takes one

image text in transcribed

Introduction to Matlab Spring 2018 HW 9 Due on the week of March 14, 2018 Section: Name: Write a function named write_two_digits that takes one scalar input argument (the function does not have to check that the input is a scalar), returns no output arguments, and prints to the Command Window the name of the value of the input. The function must check to determine whether the input is a whole number in the range, -99 to +99. If the number is out of range, the function prints an error message and returns. If the number is in range, then the function prints the integers name (examples of names are given below). If the input falls in the range -9 to +9 then the printout must be the same as that of write_digit, which is given in this Section, and that function must be used as a subfunction in the M-ile write_two_ digits.m. HINT: The built-in 1. function floor can be helpful. It can be employed to determine whether a number is a whole number, and it can also be employed to determine the value of the digit in the tens place and the value of the digit in the ones place. The printout of write_ two_digits must be consistent with these examples: write two_digits(O) >write_two_digits(3) write_two_digits(-3) write_two_digits(10) write two_digits(12) write_two_digits(18) >> write_two_digits(23) write_two_digits(-99) write_two_ digits(113) > write_two_digits(24.7) minus three twelve eighteen twenty-three minus ninety-nine Input must be an integer from -99 to +99 Input must be an integer from-99 to +99 Introduction to Matlab Spring 2018 HW 9 Due on the week of March 14, 2018 Section: Name: Write a function named write_two_digits that takes one scalar input argument (the function does not have to check that the input is a scalar), returns no output arguments, and prints to the Command Window the name of the value of the input. The function must check to determine whether the input is a whole number in the range, -99 to +99. If the number is out of range, the function prints an error message and returns. If the number is in range, then the function prints the integers name (examples of names are given below). If the input falls in the range -9 to +9 then the printout must be the same as that of write_digit, which is given in this Section, and that function must be used as a subfunction in the M-ile write_two_ digits.m. HINT: The built-in 1. function floor can be helpful. It can be employed to determine whether a number is a whole number, and it can also be employed to determine the value of the digit in the tens place and the value of the digit in the ones place. The printout of write_ two_digits must be consistent with these examples: write two_digits(O) >write_two_digits(3) write_two_digits(-3) write_two_digits(10) write two_digits(12) write_two_digits(18) >> write_two_digits(23) write_two_digits(-99) write_two_ digits(113) > write_two_digits(24.7) minus three twelve eighteen twenty-three minus ninety-nine Input must be an integer from -99 to +99 Input must be an integer from-99 to +99

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 Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions