Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pragma solidity ^0.4.21;
- contract GlobalCalculator_V1 {
- uint[] internal _nums;
- function addNum(uint x) public {
- _nums.push(x);
- }
- function getSum() public view returns (uint sum) {
- for (uint i = 0; i < _nums.length; i++) {
- sum += _nums[i];
- }
- }
- }
Add Comment
Please, Sign In to add comment