@import 'https://fonts.googleapis.com/css?family=Ewert|Roboto&effect=3d';
<p class='font-effect-3d'
style='color:darkblue; font-family:Ewert; font-size:120%;'>
style='color:darkblue; font-family:Roboto; font-size:110%;'
onclick='document.getElementById("cell21").innerHTML=result21()'>
<p class='font-effect-3d'
style='color:darkblue; font-family:Ewert; font-size:120%;'>
result and number of replacements</p>
style='color:darkblue; font-family:Roboto; font-size:110%;'
onclick='document.getElementById("cell22").innerHTML=result22()'>
X=Array.from({length:10},()=>
Math.round(Math.random()*10000-5000)/100);
Y=Array.from({length:10},()=>
Math.round(Math.random()*10000-5000)/100);
function result21(){return 'X => '+X+'</br>Y => '+Y;}
for (var n=0; n<X.length; n++){
if (X[n]>0) {Z[n]=X[n]} else {Z[n]=Y[n]; c++};}
return 'Result => '+Z+'</br>Number of replacements => '+c;}
No comments:
Post a Comment