Feeds
문제를 풀었습니다
Compute Fibonacci Number
Compute the n-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296
2년 초과 전
문제를 풀었습니다
Infernal Recursion
Consider the recursion relation: x_n = (x_(n-1)*x_(n-2))^k Given x_1, x_2, and k, x_n can be found by this definition. Wr...
2년 초과 전
문제를 풀었습니다
Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...
2년 초과 전
문제를 풀었습니다
Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]
2년 초과 전
문제를 풀었습니다
Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.
2년 초과 전
문제를 풀었습니다
Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....
2년 초과 전
문제를 풀었습니다
Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
2년 초과 전
문제를 풀었습니다
Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.
2년 초과 전
문제를 풀었습니다
Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm
2년 초과 전
문제를 풀었습니다
Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5
2년 초과 전
문제를 풀었습니다
Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.
2년 초과 전
문제를 풀었습니다
Sum of first n positive integers
Given n, find the sum of first n positive integers Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these terms is 55
2년 초과 전
문제를 풀었습니다
Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0
2년 초과 전
문제를 풀었습니다
Replace odd number in given matrix by zero
Replace the odd numbers in a given matrix with zero. Example A = [ 17 24 1 8 15 23 5 7 ...
2년 초과 전
문제를 풀었습니다
Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.
2년 초과 전
문제를 풀었습니다
Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively
2년 초과 전
문제를 풀었습니다
Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.
2년 초과 전
문제를 풀었습니다
Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.
2년 초과 전
문제를 풀었습니다
Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...
2년 초과 전
문제를 풀었습니다
Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...
2년 초과 전
문제를 풀었습니다
Convert Kilometers to Miles
Convert kilometers to miles. Consider 1 km = 0.62 mile. Note: Don't use the '*' operator.
2년 초과 전
문제를 풀었습니다
Find out sum and carry of Binary adder
Find out sum and carry of a binary adder if previous carry is given with two bits (x and y) for addition. Examples Previo...
2년 초과 전
문제를 풀었습니다
Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...
2년 초과 전




