Sumit has written the following code but the code is not giving the desired output. If the inputs 20
then the output should be 40. Identify problem in the code. Rewrite the correct code.
*- input("Enter number")
print)
Further after correction of the code, if the value of x=80, what is the value of k?
What will be the output of the following arithm
Answers
Answered by
1
Answer:
Write a function called valid_date that takes three positive integer scalar inputs year, month, day. If these three represent a valid date, return a logical true, otherwise false. The name of the output argument is valid. If any of the inputs is not a positive integer scalar, return false as well. Note that every year that is exactly divisible by 4 is a leap year, except for years that are exactly divisible by 100. However, years that are exactly divisible by 400 are also leap years. For example, the year 1900 was not leap year, but the year 2000 was. Note that your solution must not contain any of the date related built-in MATLAB functions.
Similar questions