Diagonal Product of A Square Matrix
For a matrix A, calculate the product of its diagonal elements.
* Assume all input matrices are square & corresponding element...
2 years ago
Solved
Recurrence relation
A recurrence relation is given by
P(1) := 1
P(n+1) := exp(1) - (n+1)*P(n)
Write a function that, given an integer |...
Draw "C" in a zero matrix
Given a x-by-x matrix filled with zeros (x> 4). Use 1 to draw a letter C into it! Like this:
x = 5, y =
1 1 1 1 1
1 0 0 0 1
...
2 years ago
Solved
Numbers on 7-segment
This is a 7-segment:
_
|_|
|_|
It's a 3-by-3 char matrix.It has made by 3 characters: '_' , '|' and ' ' (space...
2 years ago
Solved
Circular Segment Area
Let us consider a circle with radius . If we draw an angle (in radians) from the center of the circle, the two radii forming th...
2 years ago
Solved
Subdivide the Segment
Two points, P1 and P2, with integer x-y coordinates are given. These uniquely determine a third point, P0, on the extended line ...
2 years ago
Solved
Do the line-segments intersect?
You are given two line segments. Do they cross?
Consider one segment as (x1,y1) to (x2,y2), the other segment as (x3,y3) to (x4...
Find the function
Given a set of point (x,y) and the coordinate x of a new point, find the y value of new point.
2 years ago
Solved
continuous compounding
what's the present value of having 100 dollars after n years given a continuously compounded rate i ? keep only 2 decimals pleas...
2 years ago
Solved
Exponentiation
Given 3 integers b,e,k; find --
mod(b^e,k)