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
...
Sum of series III
What is the sum of the following sequence:
Σ(2k-1)^3 for k=1...n
for different n?
約7年 前
解決済み
Sum of series II
What is the sum of the following sequence:
Σ(2k-1)^2 for k=1...n
for different n?
約7年 前
解決済み
Sum of series I
What is the sum of the following sequence:
Σ(2k-1) for k=1...n
for different n?
約7年 前
解決済み
Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively
約7年 前
解決済み
If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...
約7年 前
解決済み
Back to basics 3 - Temp Directory
Covering some basic topics I haven't seen elsewhere on Cody.
Return a string that is the path to the system's current temp di...
約7年 前
解決済み
Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F.
Examples:
Input F = 90
Output C is 32.22
I...
約7年 前
解決済み
square root
Find the square root (y) of an input (x).
Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...
Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners
Points = [x, y];
Triangle = [x1, y1; x...
約7年 前
解決済み
Calculate the centroid of a triangle
Info: https://en.wikipedia.org/wiki/Centroid
Example
Input:
x = [0 0 1]; % x-coordinate
y = [0 1 0]; % y-coordinat...