How to attach button values to the input form inside?

I would like a user to either type or use the buttons to submit their calculations. I figured out the typing but I cant figure out the button on click.

  </head>
  <body class="main">
</div>
</div>
</div>
    <h1><div id="result"></div></h1>

    <input id="text" placeholder="Please type number" />
    

    <button id="equals">Calculate</button>
    <br />
    <div id="quote"></div>
     <div class="ben"><img src="7993.gif" alt=""></div>
     <button>1</button>
     <button>2</button>
     <button>3</button>
     <button>+</button>
     <button>-</button>
     <button>=</button>
  </body>
</html>