top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to create rand3() from rand2() function?

0 votes
380 views

rand2() function returns 0 or 1 with equal probability. How to implement rand3() using rand2().

posted Jun 21, 2016 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

Count how many integers from 1 to N contains 0's as a digit? Please share the sample c program?

+2 votes

Problem
Given a table of size n * m, with each cell having a color value from the set {r, g, b}, find the area of the largest triangle that has one side parallel with the y – axis (vertical) and has no two vertices that have the same color value.

Input
First line contains the size of the matrix i.e. n * m where n is the number of rows and m is the number of columns.
n lines follow each having a string of size m.

Output
A single value for the area of the triangle.

Provide the C Code for the above problem?

...