title: How to automatically send ERC 20 tokens to the sender of ETH (solidity)
body: <p>I am in the process of creating an erc20 token using solidity. I am not a coding expert. I managed to gather codes from google. Before deploying the contract on ethereum network, I want to do the following:</p>
  <p>Whenever someone sends ETH to the smart contract address, the equivalent tokens should be automatically sent to the from the address of that ETH transaction.  How to do that? Also, I want to set the price of the token in eth. Please provide me a sample code for that...</p>