My function brokes. It gives 0 errors but brokes when i run it... int findk(int a,int b, int n) { int m[1000]; int j=1; for(i=1;i<=b;i++) { if((pow(2,i)>a)&&(pow(2,i)<b)) { m[j]= pow(2,i); j++; } } int k=m[1]; for(i=1;i<j;i++)if(m[i]>k)k=m[i]; return k; }

Member Avatar
Member Avatar
+0 forum 2

I have this code to showor hide a div when click on button.But... If you ckick button the div appear.. but when you click again the div doesnt dissapear:| Code: function infoshowhide(){ if(document.getElementById('info11').style.display = 'none') { document.getElementById('info11').style.display = 'block'; } else { document.getElementById('info11').style.display = 'none'; } } *and i need something like this for final result :* function infoshowhide(){ contentxinfo=document.getElementById('info') + 'x'; //x is a nr i wish to make an array... info1 ...or info2 .. info3...this thing if(document.getElementById(contentxinfo).style.display = 'none') { document.getElementById(contentxinfo).style.display = 'block'; } else { document.getElementById(contentxinfo).style.display = 'none'; } }; i wish to make an array... info1 …

Member Avatar
Member Avatar
+0 forum 7

The End.