void main( ) { randomize( );int arr[ ]={4,2,1,0},n; int r= random(2)+3; for(int j=1;j<4;j++) { n=random(j); cout<<arr[n]+r<<"@"; | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

void main( ) { randomize( );int arr[ ]={4,2,1,0},n; int r= random(2)+3; for(int j=1;j<4;j++) { n=random(j); cout<<arr[n]+r<<"@";

What will be the output of this code - options are (I)8@6@8@ (ii)6@5@8@ (iii) 7@8@8@ (iv) 7@7@5 Also find the max and min value of variable r ? Please solve this

23rd Dec 2018, 3:49 AM
Shogun THE GREAT
Shogun THE GREAT - avatar
1 Answer
+ 2
Code Playground is the answer.
23rd Dec 2018, 4:22 AM
Diego
Diego - avatar