ASCII Birthday Cake
Given an age and a name, give draw an ASCII birthday cake. For example, given the name "CODY" and the age 5, return a string wit...
8年以上 前
解決済み
Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...
8年以上 前
解決済み
Basic electricity in a dry situation
This is a very hypothetical situation between two individuals in a very dry atmosphere.
He came running in rubber boots when...
8年以上 前
解決済み
Van Eck's Sequence's nth member
Return the Van Eck's Sequence's nth member.
For detailed info : <http://oeis.org/A181391 OEIS link> and <https://www.theguard...
8年以上 前
解決済み
Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...
8年以上 前
解決済み
Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer whi...
Energy of a photon
Given the frequency F of a photon in giga hertz.
Find energy E of this photon in giga electron volts.
Assume h, Planck's ...
8年以上 前
解決済み
How to subtract?
* Imagine you need to subtract one number from another using MATLAB.
* You will not be using eval for this task.
* Given two A...
8年以上 前
解決済み
Ackermann's Function
Ackermann's Function is a recursive function that is not 'primitive recursive.'
<http://en.wikipedia.org/wiki/Ackermann_fun...
9年弱 前
解決済み
Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B.
So if
A = [1 2 3; 4 5 6];
and ...
9年弱 前
解決済み
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
9年弱 前
解決済み
Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.]
Non-scor...
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
9年弱 前
解決済み
Times 2 - START HERE
Try out this test problem first.
Given the variable x as your input, multiply it by two and put the result in y.
Examples:...