Info

This question is closed. Reopen it to edit or answer.

im on exam converts to units

2 views (last 30 days)
plshelpmee
plshelpmee on 27 Dec 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
PLS HELP ME I M ON EXAM
WRITE A FUNCTION that converts a given length in centimeters to inches or metres. The function has two inputs: the first one x, is a number( lenght in centimeters), and the second one is an integer n , that defines which unit to convert into, If n is 1 function terurns the lenght in meters , and if n is 2, it returns lenght in inches. otherwise (if n is neither 1 or 2) the function prints 'the 2nd input must be 1 (for meters) or 2 (for inches)! on the screen and gives no output
  1 Comment
KALYAN ACHARJYA
KALYAN ACHARJYA on 27 Dec 2019
Edited: KALYAN ACHARJYA on 27 Dec 2019
"PLS HELP ME I M ON EXAM"
Are you currently in the examination hall?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!