Question: In a script file named LASTNAME_PROB 3 m write a script according to the following specification Before starting clear all Workspace variables and the Command
In a script file named LASTNAME_PROB 3 m write a script according to the following specification Before starting clear all Workspace variables and the Command Window contents. create a variable named intNun and use it to continuously prompt the user until the user enters a nonnegative integer, Determine if intNum actually holds a nonnegative integer and not a fixed-point (real) number. Assume the user will always enter a numerical scalar. Use a while-end statement to reverse the order of all the individual digits contained in intNum thereby generating a reversed version of intNum a variable named revIntNum to store/manipulate intermediate scalar values of the reversed version of intNum you may not use any array manipulations, or array operations, including array concatenation Display the scalar revIntNum to the command Window formatted as an integer, A sample program output is shown below. In a function file named LASTNAME_get CubeLength, m write a user-defined function named LASTNAME_getCube Length () that does not accept any input parameters but returns an output parameter named length out that represents the length of any side of a cube. The function continuously prompts the user for the cube's length until the user enters a nonnegative length that is less than fifteen. You may assume the user will always a numerical scalar. In a function file named LASTNAME_ Calccube info.m write a user -defined function named LASTNAME_CalccubeInfo() that an input parameter named lengthin that represent the length of any side of a cube and returns output parameters named surface Area out and Volume out that represent the cube's surface area and volume, respectively. This function should handle a lengthin that is a scalar or an array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
