Professional Documents
Culture Documents
Assignment0 PDF
Assignment0 PDF
or Assignment 0
1. RAND() is a function that generates a single random number in the range (0,1)1 ,
called as x = RAND(). So, a single point in x, y plane will take two calls of RAND.
Create suchp calls multiple times (≥ 10000) and check the ratio of total calls and
when the x2 + y 2 ≤ 1.0.2
2. Write a program for basic arithmetic(+, −, ×, ÷) with vector derived data type
with vector defined in R3 , e.g.
type :: vector
real :: x ,y , z
end type vector
Please:
• comment on the code generously.
1
Never use this in any real problem.
2
Discussed in class
1