Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pragma solidity ^0.4.24;
- contract Arithmetic{
- uint256 public storedValue; //256 bits unsigned integer
- // Constructor function. Runs once when the contract is deployed
- // Add any initialization operations here.
- constructor() public{
- storedValue = 100;
- }
- function add(uint256 number) public {
- storedValue = storedValue + number;
- }
- function subtract(uint256 number) public {
- storedValue = storedValue - number;
- }
- function multiplication(uint256 number) public {
- storedValue = storedValue * number;
- }
- function division(uint256 number) public {
- storedValue = storedValue / number;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement