Advertisement
Guest User

Calculator-math-io

a guest
Feb 23rd, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve () {
  2.     var equation = document.getElementById('out').value;
  3.     document.getElementById('out').value = eval(equation);
  4. }
  5.  
  6. function first () { document.getElementById('out').value += '1'; }
  7. function second (){ document.getElementById('out').value += '2'; }
  8. function third () { document.getElementById('out').value += '3'; }
  9. function fourth (){ document.getElementById('out').value += '4'; }
  10. function fifth () { document.getElementById('out').value += '5'; }
  11. function sixth () { document.getElementById('out').value += '6'; }
  12. function seventh(){ document.getElementById('out').value += '7'; }
  13. function eight () { document.getElementById('out').value += '8'; }
  14. function ninth () { document.getElementById('out').value += '9'; }
  15.  
  16. function adding (){ document.getElementById('out').value += '+'; }
  17. function minus () { document.getElementById('out').value += '-'; }
  18. function delenie(){ document.getElementById('out').value += '/'; }
  19. function multply(){ document.getElementById('out').value += '*'; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement