retagged by
2,284 views
4 votes
4 votes

main() {
    int c=0,x,i,y;
    for(i=0;i<N;i++) {
        x=random();y=random();
        if((x2+y2)<1) c++; } print(c); }

random() is a function which returns random number between $0$ or $1$, $N$ is a large number what is the output of the program?

retagged by

1 Answer

Related questions

4 votes
4 votes
1 answer
1
lamsal asked May 3, 2017
1,958 views
Let X be a length used to make three sides of a rectangle. Area of rectangle will be:A. $X^{2}/9$B. $(X-a)^{2}/4$C. $(X+a)^{2}/16$D. None of the above
0 votes
0 votes
2 answers
2
lamsal asked May 2, 2017
1,214 views
For same perimeter $p$ which of these will have least area:A. RectangleB.Equilateral triangleC.Right triangleD.CircleE. Regular hexagon
2 votes
2 votes
1 answer
3
1 votes
1 votes
2 answers
4
Tesla! asked Apr 21, 2018
597 views
void main(){ static int i=5; printf("%d",i ); If(i) main() } What will be output of the program}