Make roundn function
Make roundn function using round.
x=0.55555
y=function(x,1)
y=1
y=function(x,2)
y=0.6
y=function(x,3)
...
約5年 前
解決済み
Check that number is whole number
Check that number is whole number
Say x=15, then answer is 1.
x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...
約5年 前
解決済み
MATLAB Basic: rounding IV
Do rounding towards plus infinity.
Example: -8.8, answer -8
+8.1 answer 9
+8.50 answer 9
約5年 前
解決済み
All capital?
Are all the letters in the input string capital letters?
Examples:
'MNOP' -> 1
'MN0P' -> 0
約5年 前
解決済み
Count decimal digits of a number
* Given an integer number you have to return the number of its digits.
* For example 248 has 3 digits and 1589 has 4 digits
...
約5年 前
解決済み
Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F.
Examples:
Input F = 90
Output C is 32.22
I...
約5年 前
解決済み
Matrix to column conversion
Given a matrix of any size, convert it into a column vector.
e.g A=[10 20 30;
40 50 60]
then,
B = [10;
40;
...
約5年 前
解決済み
Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...
Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...
約5年 前
解決済み
Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....
約5年 前
解決済み
Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...