- To generate randomnumber read about randi.
- To check whether even or not use mod. Read about mod.
- To check whether greater or not, read about inequalitites.

4 views (last 30 days)

KSSV
on 3 Jul 2020

- To generate randomnumber read about randi.
- To check whether even or not use mod. Read about mod.
- To check whether greater or not, read about inequalitites.

Opportunities for recent engineering grads.

Apply Today
## 4 Comments

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/558902-write-a-matlab-code-that-generate-a-random-number-then-divide-the-generated-number-by-4-if-its-even#comment_923303

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/558902-write-a-matlab-code-that-generate-a-random-number-then-divide-the-generated-number-by-4-if-its-even#comment_923303

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/558902-write-a-matlab-code-that-generate-a-random-number-then-divide-the-generated-number-by-4-if-its-even#comment_923315

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/558902-write-a-matlab-code-that-generate-a-random-number-then-divide-the-generated-number-by-4-if-its-even#comment_923315

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/558902-write-a-matlab-code-that-generate-a-random-number-then-divide-the-generated-number-by-4-if-its-even#comment_923321

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/558902-write-a-matlab-code-that-generate-a-random-number-then-divide-the-generated-number-by-4-if-its-even#comment_923321

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/558902-write-a-matlab-code-that-generate-a-random-number-then-divide-the-generated-number-by-4-if-its-even#comment_923555

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/558902-write-a-matlab-code-that-generate-a-random-number-then-divide-the-generated-number-by-4-if-its-even#comment_923555

Sign in to comment.